Here is what I am trying to do
1. Create a new contact programtically
2. Download the content of an image from an image URL on the web
3. Associate that with the netly created contact via the
Contacts.People.setPhotoData() method


All 3 seem to work. But in the end when I go to the contact book via
the native address book client I dont see the image even though the
contact is there.

Here is the code

                                Uri mobileUri = Uri.withAppendedPath(u,
Contacts.People.Phones.CONTENT_DIRECTORY);

                                values.clear();
                                values.put(Contacts.Phones.TYPE, 
Phones.TYPE_MOBILE);
                                values.put(Contacts.Phones.NUMBER, 
"+165076478888");
                                Uri u = getContentResolver().insert(mobileUri, 
values);
                                byte[] b=getImageAsByteArray(imgUrl); // this 
method works
- i have checked it
                                
Contacts.People.setPhotoData(getContentResolver(), u, b);

Whats going on?

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

Reply via email to