You need to first resolve the URI like this: uri = ContactsContract.lookupContact(getContentResolver(), uri);
On Thu, Nov 12, 2009 at 3:07 AM, code_android_festival_way < festival.s...@googlemail.com> wrote: > I am trying to get my application updated to the latest > ContactsContract API and got some problems. In my application I am > trying to pick a contact and use the received URI for loading up his > contact picture. > > This is the way I am doing it: > > http://paste.pocoo.org/show/SQI91OBuCKk0JQC63Zkd/ > > When I am trying to load the picture for the given URI I am getting an > Illegal Argument Exception: > > 11-12 11:45:14.071: ERROR/AndroidRuntime(226): Caused by: > java.lang.IllegalArgumentException: Unknown URL > content://com.android.contacts/contacts/lookup/0n3729434D412939314B/1/photo > > The given URI is: > content://com.android.contacts/contacts/lookup/0n3729434D412939314B/1 > > which looks kinda strange compared to the URIs I have got with Android > 1.6. > > Could someone help me to get this one working with Android 2.0? > > Thank you very much. > > Regards > > -- > 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<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- 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