Hi Zsolt,

Your URI is content://com.android.calendar and it should be
content://com.android.calendar/calendar.
Can you try CalendarContract.Calendars.CONTENT_URI instead of
CalendarContract.CONTENT_URI?

Thanks,
Mike

On Oct 23, 11:57 pm, Zsolt Vasvari <zvasv...@gmail.com> wrote:
> I am trying to convert my Calendar code to the new ICS APIs.
>
> For starters, I am trying the simplest possible operation -- reading
> the list of Calendars.
>
> I am using the following code:
>
> context.getContentResolver().query(CalendarContract.CONTENT_URI,
> CALENDARS_PROJECTION, CALENDARS_WHERE, null,
> CalendarContract.Calendars.DEFAULT_SORT_ORDER)
>
> but I am getting an unknown URL exception on the ICS emulator, both
> Standard and Google API images:
>
> E/ACRA    (  746): Caused by: java.lang.IllegalArgumentException:
> Unknown URL content://com.android.calendar
> E/ACRA    (  746):      at
> android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:
> 165)
> E/ACRA    (  746):      at
> android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:
> 135)
> E/ACRA    (  746):      at
> android.content.ContentProviderProxy.query(ContentProviderNative.java:
> 358)
> E/ACRA    (  746):      at
> android.content.ContentResolver.query(ContentResolver.java:304)
>
> Is this supposed to work on the emulator?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to