Java.lang.IllegalArgumentException: Bad Class: Class Java.lang.String?
Please I get this error that I do not understand. This is the code: Cursor cursor = context.getContentResolver() .query(Uri.parse('content://com.android.calendar/events
Solution 1:
Read the API Guide on Calendar Provider to know about accessing the calendar events.
The mistakes you are making are:
- Do not use hard coded string literals ("dtstart", ..); use the constants defined in
CalendarContract.EventsColumns
for the column names. - The
DTSTART
andDTEND
columns contain the start and end time inlong
format (milliseconds since epoch).
Post a Comment for "Java.lang.IllegalArgumentException: Bad Class: Class Java.lang.String?"