Android : How Do I Load A Contact Photo?
Mar 4, 2010
I'm having trouble loading a photo for a contact in Android. I've googled for an answer, but so far have come up empty. Does anyone have an example of querying for a Contact, then loading the Photo?
So, given a contactUri which comes from an Activity result called using
startActivityForResult(new Intent(Intent.ACTION_PICK,ContactsContract.CommonDataKinds.Phone.CONTENT_URI),PICK_CONTACT_REQUEST)
content://com.android.contacts/data/1557
The loadContact(..) works fine. However when I call the getPhoto(...) method, I get a null value for the photo InputStream. It is also confusing because the URI values are different. The contactPhotoUri evaluates to: See the comments inline in the code below. Code...
View 4 Replies
Aug 4, 2010
I am trying to simply load just the contact photo of all my contacts and display them in a gallery.widget. Do I create a query? I was trying simply just to do People.loadcontactphoto but was getting errors....Any easy way to do this?
View 1 Replies
View Related
Jun 7, 2010
Anyway i can get the photos from my facebook friends to be the photo for there contact photo in my phone book?
View 2 Replies
View Related
Oct 29, 2010
Trying to add a photo from my sd card to a contact. Did the edit thing and tap the grey icon in top left and nothing?
View 2 Replies
View Related
Aug 18, 2010
Alright, I'm just trying to learn about using Contact information, but I'm a bit stuck. I would like to be able to display a picture for the contact. Using the following code that I have, how would I be able to put the photo for the contact in the ImageView in contact_entry?
ListView contacts_list = (ListView) findViewById(R.id.contacts_list); Code...
View 1 Replies
View Related
Aug 30, 2010
Is there any way to retrieve the data type of a contact's photo? (e.g. "image/png" or "image/jpeg"). Using the Contacts Provider I can read the photo byte array only. In this case can we get the image type from the image stream?
View 3 Replies
View Related
May 29, 2010
I use the facebook linked photos for my contact list but this doesn't update with any new display pictures the contact may have on facebook - is it possible to auto update these contact's photos, otherwise what's the point of a "link"?
View 3 Replies
View Related
Sep 29, 2009
I was hoping to include the photo for each contact in a live folder. I am using People.loadContactPhoto() to get a bitmap and am placing it into the content provider's result column for LiveFolders.ICON_BITMAP but I keep getting a NullPointerException. Any ideas? Should I not be doing this?
View 17 Replies
View Related
Jul 14, 2010
I've got an imageview which I'm displaying a contacts picture using a uri which always looks similar to this:
content://com.android.contacts/contacts/34/photo
How would i be able to detect whether this photo exists, as if it doesn't then i want to use a placeholder instead (stored in my drawable folder). at the moment it just shows a blank image.
View 2 Replies
View Related
Sep 30, 2010
I have this code:`public class MaxsapListAdapter extends BaseAdapter {
private LayoutInflater mInflater;
private Bitmap mIcon1;
private Bitmap mIcon2;
private Bitmap mIconCall;
private String[] DATA;
MaxsapListAdapter(Context context, String[] DATA) {
// Cache the LayoutInflate to avoid asking for a new one each time.
mInflater = LayoutInflater.from(context);....................................
which loads some arbitrary data array on a list and sets some example icons too,I would like to be able to use users contacts on my list next to users name e.g. the list will be as many rows as contacts user has on his phone and in every contact that there is a photo load that photo next to contacts name else load a blank image, is this possible? and how?
View 1 Replies
View Related
Nov 25, 2009
My application needs to import some photos from Gallery. Indeed, the application groups several persons. I want to attach a photo picked from Gallery to each person. Do I need to develop a activity like edit Contacts? This involves developing the display of images in a grid. Or can I use a provider or something-like to avoid to develop a Gallery-like with memory leak?
View 10 Replies
View Related
Dec 27, 2009
I love the way the Hero's photo album and contact app integrates with Facebook / Flikr. From the album you can go right into you friend's pictures and thumb through them, and from the contacts you can see birthdays, Facebook profile pics, status updates, etc. Is there anything like this available in the market?
View 3 Replies
View Related
Aug 11, 2010
I'm a new Android user coming from years of BlackBerry use. I have the Droid X and was wondering, when using Google Talk, is there a way to enlarge the photo that my friends/Talk contacts use? Also, is there a way to have their selected photos replace the existing photo I have for them in my Contacts?
View 3 Replies
View Related
Oct 17, 2010
In my app, I am using below code to obtain all contacts with PHOTO_ID:
CODE:.............
The app has a list view to display all contacts and use the ContactPhotoLoader in the stock contact app to load the contact photo async. When running, some contact photo can be displayed correctly and some cannot.
When clicking on the list items, the app will start the view contact activity of the stock contacts app:
CODE:..............
For the contacts, which photo cannot be displayed properly, is able to display correctly in the stock view contact activity. I have compared the source code of the stock contacts app and my app. They are doing the same thing basically. I have also checked for the permissions used by my app are covered the set of permissions used by the stock contacts app.
View 5 Replies
View Related
Jun 7, 2010
I have a problem and not sure if any one have it too. I took a picture of my wife and set as contact photo. and i put her in my favorites widget, at first it was looking really clear and nice, but after like an hour or two when slide to favorites widget now look fuzzy and blurry. but when i re-edit the picture it comes back clear again.
View 7 Replies
View Related
Jan 19, 2010
Android:how do i retrieve the contact photo,name,number from the address book and display it using a list view
View 2 Replies
View Related
Apr 8, 2010
I want to write a short app for getting some info from contacts, the first list screen I have should display the user Image (or an Image from resources if no such image exists) an the user display name. The problem is I don't seem to find a query that will provide me with the display name and a user id And the image URI in the same query. Moreover I'm aware of the fact that if the user has no image and the URI is empty or null i will most likely to get an exception while the adapter calls setViewImage(). Is there a simple way around it or should I override the setViewImage() or bindView() methods?
Also about the query, any chance I can make a single query for contact URI, _ID, contact_id and display name? my current queries: To get the contacts:
private Cursor getContacts() { Uri uri = ContactsContract.Data.CONTENT_URI;
String[] projection = new String[] ContactsContract.Data._ID,ContactsContract.Data.CONTACT_ID,
ContactsContract.Data.DISPLAY_NAME };
String selection = ContactsContract.Data.MIMETYPE + " = ?";
String[] selectionArgs = {ContactsContract.CommonDataKinds.StructuredPostal.CONTENT_ITEM_TYPE};
String sortOrder = ContactsContract.Contacts.DISPLAY_NAME + " ASC";
return managedQuery(uri, projection, selection, selectionArgs, sortOrder); }
If I have a contact id and want the image:
int _id = m_cursor.getColumnIndex(ContactsContract.Contacts._ID);
//try to retrieve the photo, if exists.
Uri photoUri = ContentUris.withAppendedId(ContactsContract.Contacts.CONTENT_URI,
m_cursor.getLong(_id)); InputStream is = ContactsContract.Contacts.openContactPhotoInputStream(m_context.getContentResolver(), photoUri);
Here I get from a cursor with _ID column the id and then creating the uri, I know I can get a row number but I'm not familiar enough with contentProvider to know how to join tables to get it all in one query (if even possible).
View 2 Replies
View Related
Nov 26, 2013
I have an old mate who has just got his first mobile phone, it is a Motorola Lazr on "3" PAYG
he has taken a portrait photo, with the phone, of a person on his contact list, he would like to put this photo onto the blank icon next to there phone number !
so we "set photo to", there is two choices, we select contact list, browse to the relevant position in his contact list and every time it says "read only, this cannot be used" ?
View 2 Replies
View Related
Jun 5, 2010
Left the Pre for the Evo and so far I really like the new phone. One thing Web OS did was import all my FB contacts, including profile pic, into my contacts. Loved it.
I brought over my contacts from the Pre - the FB profile pics did not migrate.
Is there a way to make this happen on the Evo - with or without a separate app? I'm talking about syncing my contacts with the FB app or something like that.
I read this somewhere..."The FB app can sync Facebook profile photos into your existing contact list."
View 3 Replies
View Related
Oct 9, 2010
I have some phone contacts who are linked to their Google and Twitter accounts. The photo of the contact (when I get a call) is set to the one in the Twitter, I am trying to set it to the one used by Google. Is there a way for me to do that?
View 4 Replies
View Related
Apr 16, 2014
I need to recover a photo of my dog which although is set as profile photo the original on my sd card is deleted and i would like to recover it before i reset the phone back to factory.
My understanding of this is that the photo is stored in the database of android contacts which is why it doesn't show up in gallery or any other file finding or photo finding apps. I would love to extract it as the dog has passed away and it's one of my favourites of him.
How to extract the photo or if I am wrong regarding the location and remove it?
View 4 Replies
View Related
Feb 26, 2010
By default, the Hero displays a green android logo when calling a number (contact or not). Is there a way to change that picture?
View 1 Replies
View Related
Aug 6, 2010
I have applied my photos to my contacts. My only issue is the image size. I need a full or half screen image, rather then the thumbnail (1x1). Can this be fixed as is, or do I need an app for that?
View 2 Replies
View Related
Sep 23, 2010
How do I add a contact photo to my contacts within the Droid X? Im not using Google for syncing and I want to use photos that are on my SD card.Something seems to have changed since the upgrade to 2.2.
View 3 Replies
View Related
May 3, 2010
I just bought this phone. I was playing with the contacts and was wondering: can one select the facebook photo you want for each contact?
I have linked the facebook profile to my contact. I can choose "facebook" for the contact's photo, but I have no control over which photo is displayed.
Can I:
a) select a specific facebook foto?
b) save a specific facebook foto from the contact's facebook pictures and set the saved photo as the contact's picture?
View 1 Replies
View Related
Jan 6, 2010
I took a photo directly in contacts but I really like to get hold of that picture as a JPEG. Does anyone know where its stored?
View 2 Replies
View Related
Jul 4, 2010
I know i can do the process on the phone, by tagging someone from a photo on the smart card.
View 4 Replies
View Related
Jul 19, 2010
I've attached camera pics, downloads and upload to the SD card. The problem is that when these contacts call/I call them the quality is sometimes awful. Others look perfect. Any idea why?
View 10 Replies
View Related
Sep 7, 2010
I have several contacts that are linked from multiple sources - for example, I have my wife on FB, twitter, Gmail, etc. Currently the contact photo is pulled from Twitter, but it's an old photo and not updated nearly as much as her FB photo. Is there any way to set it so it defaults to Facebook photo for all contacts, or even a way to just change it for specific contacts of my choosing?
View 6 Replies
View Related
Jun 12, 2010
I was setting up some photos for the Photo Caller ID function for incoming calls and was rather disappointed at the quality of the image that comes up. I either add an image to the contact in the People app or I go to the gallery and chose to "Set as" a contact icon. The picture pops up and you are given a little square crop/zoom tool to chose the portion of the picture that you want as you icon/photo caller ID. When I stretch the square OUT as big as possible to crop and then set the image with the contact, the caller ID image that comes up is good. However, any cropping/zooming is significantly Degrades/Pixelates the image that is chosen.
I'm not using the FULL 8MB resolution (set to 5MP) for the camera and I know if you crop and zoom any image, the more you zoom the worse the quality of the picture, But the 5MP shots I have should be MORE THAN sufficient to produce a little square of a photo caller ID. I had photo caller ID that popped up on my Palm Centro with photos was cropped to 320 x 320 and saved with LOW resolution and those photos were very clear. Even with the crop and zoom that is required to produce the contact/photo caller ID image, the 5MP photos I am using should be more than sufficient to produce a clear image. Is there a fix/trick for the quality to improve? Here we have this big beautiful screen and you crop a nice-sized 5MP picture for a tiny square caller ID photo and the quality is horrible.
View 8 Replies
View Related