Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - how to set contactphoto

how to set contactphoto

Put your problem here if it does not fit any of the other categories.

how to set contactphoto

Postby surya.n.k » Fri Jul 02, 2010 11:56 am

how to set contactphoto, because i am unable to set the photo using this code it is not shown in list view and when we go to contactdetails view, i am able to see the contact.., can any one give solution for this.
this code i am using to loadcontactphoto in bindview().
//------------------------------------------------------//
int id = cursor.getColumnIndex(People._ID);
Uri uri = ContentUris.withAppendedId(People.CONTENT_URI, cursor.getLong(id));
Bitmap bitmap = People.loadContactPhoto(context, uri, R.drawable.imilogo, null); imageView.setImageBitmap(bitmap);

//------------------------------------------------------//

byte[] photo = null;
Bitmap bm = null;
int id = cursor.getColumnIndex(People._ID);
Cursor contactPhoto = getContentResolver().query(Contacts.Photos.CONTENT_URI, null, Contacts.PhotosColumns.PERSON_ID + "=" + id, null, null);
if (contactPhoto.moveToFirst()) {
photo = contactPhoto.getBlob(contactPhoto.getColumnIndex(Contacts.PhotosColumns.DATA));
bm = BitmapFactory.decodeByteArray(photo, 0, photo.length, null);
}
contactPhoto.close();
imageView.setImageBitmap(bm);
surya.n.k
Developer
Developer
 
Posts: 26
Joined: Fri Dec 07, 2007 7:33 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: MSNbot Media, Yahoo [Bot] and 16 guests