Issue

Getting a exception while trying to get a list of calendar in an Android device. 07-06 13:26:51.969: E/AndroidRuntime(19053): Caused by: java.lang.SecurityException: Permission Denial: reading com.android.providers.calendar.HtcCalendarProvider uri content://com.android.calendar/calendars from pid=19053, uid=10206 requires android.permission.READ_CALENDAR, or grantUriPermission() 07-06 13:26:51.969: E/AndroidRuntime(19053):      at android.os.Parcel.readException(Parcel.java:1430)

Solution

The following permissions are required to read and write to any Calendar available on the Android device. These need to be defined in the AndroidManfiest.xml file as follows: <uses-permission android:name="android.permission.READ_CALENDAR" /> <uses-permission android:name="android.permission.WRITE_CALENDAR" >