Skip to content

Instantly share code, notes, and snippets.

@yeradis
Created March 28, 2011 16:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yeradis/890762 to your computer and use it in GitHub Desktop.
Save yeradis/890762 to your computer and use it in GitHub Desktop.
ANDROID - Failed to find provider info for Calendar, Unknown URL content://calendar/events
funtcion Uri getCalendarURI(eventUri boolean){
Uri calendarURI = null;
if (android.os.Build.VERSION.SDK_INT <= 7 )
{
calendarURI = (eventUri)?Uri.parse("content://calendar/events"):Uri.parse("content://calendar/calendars");
}
else
{
calendarURI = (eventUri)?Uri.parse("content://com.android.calendar/events"): Uri.parse("content://com.android.calendar/calendars");
}
return calendarURI;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment