I'm trying to insert a calendar event for 2.2 and 2.3 devices. I'm using the intents approach, as described here:
http://developer.android.com/guide/topics/providers/calendar-provider.html#intents
It worked on a 4.1 device.
But I need it compatible with 2.2+ devices, so I've refactored the app to get rid of CalendarContract.CONTENT_URI
so that it can run in versions < 14.
I'm now using this Uri, which AFAIK is compatible since Froyo:
content://com.android.calendar
But I'm always having this exception in Froyo and Gingerbread devices:
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.INSERT dat=content://com.android.calendar/events (has extras) }
These intents also fail:
Intent { act=android.intent.action.VIEW dat=content://com.android.calendar/time/1386926751452 }
Intent { act=android.intent.action.INSERT dat=content://com.android.calendar/events (has extras) }
Intent { act=android.intent.action.EDIT dat=content://com.android.calendar/events (has extras) }
I've nonetheless tried the previous content Uri (content://calendar), even knowing it was for 1.5 and 1.6 with identical result.
No need to say I've checked the calendar is installed in every device I used for testing.
Am I missing something?