Requesting runtime permission
Requesting runtime permission I am trying to update this calendar agenda app to the latest SDK. Hence, I will need to request for runtime permission. I have identify the class which need the READ_CALENDAR permission is CalendarUtilities.java, specifically this method: public Set<org.reber.agenda.AndroidCalendar> getAvailableCalendars() { ContentResolver contentResolver = context.getContentResolver(); Uri calendarsURI = CalendarContract.Calendars.CONTENT_URI; Cursor cursor = contentResolver.query(calendarsURI, new String{ CalendarContract.Calendars._ID, CalendarContract.Calendars.CALENDAR_COLOR, CalendarContract.Calendars.CALENDAR_DISPLAY_NAME }, null, null, null); // Get all the enabled calendars in the database while (cursor != null && cursor.moveToNext()) { AndroidCalendar current = new AndroidCalendar(cursor.getString(0), getColorHex(cursor.ge...