I worked on an app that lets users create appointments and then inserts them into the Android calendar. I see a crash report from a user running Android version 4.0.4
Caused by: java.lang.IllegalArgumentException: Unknown URL content://com.android.calendar/events
at android.content.ContentResolver.insert(ContentResolver.java:726)
This works fine when I test it on my Android Phone, but I'm wondering what's wrong in this case?
edit: here's my code-
ContentResolver cr = getContentResolver();
ContentValues values = new ContentValues();
values.put(Events.DTSTART, startMillis);
values.put(Events.DTEND, endMillis);
values.put(Events.TITLE, title);
values.put(Events.DESCRIPTION, location);
values.put(Events.CALENDAR_ID, calID);
values.put(Events.EVENT_TIMEZONE, TimeZone.getDefault().getDisplayName());
Uri uri = cr.insert(Events.CONTENT_URI, values);
It's crashing on cr.insert(Events.CONTENT_URI, values) but only intermittently. So far only one crash report for this problem has been submitted.