load actual photo of contact in android 2.3.* -


Still facing the problem of loading photos of actual contacts in Android 2.3. * ... tried many different ways, but get the latest photos from this phonebook. My last code:

  Uri uri = getPhotoUri (reference, contact.getPhoneBookContactId ()); Picasso Top (context) .load (Yuri). Terror (RDWable contact_icon) .into (imageViewLowGB);  

where getPhotoUri:

  public constant URI getPhotoUri (reference reference, last int contactId) {try {cursor cur = context.getContentResolver (). Query (ContactsContract.Data.CONTENT_URI, Null, ContactsContract.Data.CONTACT_ID + "=" + Contact ID + "and" + Contact Contact Data. MIMETYPE + "="); If (cur! = Null) {if (! Cur.moveToFirst ()) {return tap; // no photos}} and {return tap; Error in cursor / process}} hold (exception e) {Log.e (ImageManager.class.getSimpleName (), "error getPhotoUri" + e.getMessage ()); Return tap; } Uri Person = ContentUris.withAppendedId (ContactContact.Commission.contENT_URI, contactId); Returns Uri.withAppredPath (person, ContactsContract.Contacts.Photo.CONTENT_DIRECTORY); }  

This code gives me a photo, but if the change photo, the old photo is being reloaded ((Please, someone helps me) ... this problem only at 2.3. * Version (


Comments