Android :: Trouble Setting Photos With Contacts Contract

Nov 3, 2009

I'm happily retrieving contact photos with the new Contacts Contract APIs and cursor.getBlob, but I'm having great trouble working out how to set a contact photo.

I believe I have the right URI (at least, it works for retrieving the photo), but it just won't work for updating or adding one.

Here's my best bet:

ByteArrayOutputStream bytes = new ByteArrayOutputStream(); bitmap.compress(Bitmap.CompressFormat.JPEG, 90, bytes);

Uri uri = Uri.withAppendedPath( ContactsContract.Contacts.CONTENT_URI, friendId ); uri = Uri.withAppendedPath( uri, ContactsContract.Contacts.Photo.CONTENT_DIRECTORY);

// eg: content://com.android.contacts/contacts/6/photo

ContentValues values = new ContentValues();

values.put(ContactsContract.CommonDataKinds.Photo.PHOTO, bytes.toByteArray()); values.put(ContactsContract.CommonDataKinds.Photo.MIMETYPE, ContactsContract.CommonDataKinds.Photo.CONTENT_ITEM_TYPE );

context.getContentResolver().insert(uri, values);

And here's my exception:

java.lang.UnsupportedOperationException: Unknown uri: content://com.android.contacts/contacts/6/photo at com.android.providers.contacts.LegacyApiSupport.update (LegacyApiSupport.java:914) at com.android.providers.contacts.ContactsProvider2.updateInTransaction (ContactsProvider2.java:2924) at com.android.providers.contacts.SQLiteContentProvider.update (SQLiteContentProvider.java:139) at com.android.providers.contacts.ContactsProvider2.update (ContactsProvider2.java:1923) at android.content.ContentProvider$Transport.update (ContentProvider.java:180) at android.content.ContentProviderNative.onTransact (ContentProviderNative.java:195) at android.os.Binder.execTransact(Binder.java:287) at dalvik.system.NativeStart.run(Native Method).

Android :: Trouble setting photos with Contacts Contract


HTC EVO 4G :: Setting Up Service On I/O Evo With No Contract?

May 26, 2010

So I have one of the evos already and I called a sprint store to ask about activating it and what not. what I figured is since I did not get the phone subsidized from sprint then I should be able to activate it without being stuck in a 2 year contract. Well the guy I talked to told me otherwise. Does that seem right? Why should I be forced in to contract if I did not get the phone through them.

View 31 Replies View Related

General :: Filter Contacts By Group With Contacts Contract

Sep 16, 2010

I'm developing a big application and a part of it is about contacts. I want to, first, get all the groups of contacts. And when the users selects one, show all the contacts of the group.

I've seen other applications and widgets (like LauncherPro widget or HTC Sense Widget) than can do it, but when I try, I don't get same results.

My code is:

1.- To get an example group (this is just for testing, in real application user selects):

Code:
long idGroup = 0;
String[] GROUP_PROJECTION = new String[] {
ContactsContract.Groups._ID, ContactsContract.Groups.TITLE };
Cursor c = mcp.getContext().getContentResolver().query(ContactsContract.Groups.CONTENT_URI, GROUP_PROJECTION, null, null, ContactsContract.Groups.TITLE + " ASC");

[Code]...

2.- To filter Users by group??

View 2 Replies View Related

HTC EVO 4G :: Having Trouble Setting Downloaded Wallpapers

Jun 21, 2010

I am having trouble setting any wallpaperthat I download from the internet. Any wallpapers that came stock on the phone will set fine bury any downloaded ones will simply not set and then I willget a force close message for htc gallery.

View 1 Replies View Related

Android :: Contacts Contract / Building Across Multiple SDK Versions

Jan 11, 2010

I need my app to run on all Android versions, but the Contacts API changed in 2.0. In SDK 1.6 and earlier I use android.provider.Contacts to query the contacts DB, but this does not work in 2.0 Instead, for 2.0 I use android.provider.ContactsContract. This presents a problem: when I have code for ContactsContract, my app will not build for 1.6 and earlier. Do I need to have two separate versions of my app (one for <= 1.6 and one for 2.0 and later) or is there a way to avoid doing this?

View 1 Replies View Related

HTC Droid Eris :: Trouble Setting Up Yahoo Mail Using Mail Widget Google / Gmail

Jan 28, 2010

for some reason i can't seem to set up my personal yahoo email account. i keep getting an error saying i'm not authenticated? i just logged in with this pc and didn't have any problems. i was trying to set it up using the mail widget google /gmail worked just fine with their widget are they trying to just force me to use gmail only anyone have any similar problems and/or tips to get it set up. i would like to move to one email account but you know how it is, you get on, you get another, people have the old address guess i could forward yahoo to gmail.

View 3 Replies View Related

Android :: How To Add Photos For Contacts?

Oct 17, 2010

I was just wondering if anyone knows how to add photos for your contacts so they show up beside the bubble in Handecent SMS. I tried going into my contacts and adding a pic there, but it doesn't pick up in the APP. If I touch the box where a picture should be it just says "Call?" Is there any way to do this?

View 2 Replies View Related

Android :: Delete All Photos But Not Contacts

Sep 13, 2010

I'd like to delete all the photos on my phone to make the space available, but NOT my contacts. Formatting the disk will delete everything won't it? So what should I do?

View 4 Replies View Related

Android :: Getting Contact Photos From Facebook Only Contacts

Apr 14, 2010

The standard way of getting contact photos/uris from ContactsContracts.Contacts.CONTENT_URI does not work for any photo that is not of GOOGLE descent! meaning, if the contact does not have a Google contact with a photo, then I cannot pull a contact photo.This is not only my problem. I see that no one has really answered this question.I know that the Android Incoming Call Screen displays a Facebook photo just fine, so I am not sure why I would need to do something different.Is there someone out there, from Google/Android, who can tell me what I need to do?

View 4 Replies View Related

Android :: Contacts Photos Does Not Work After Insert / What To Do?

Aug 21, 2009

I'm writing a small backup application for contacts and i encountering some weird problems. Firs of all I retrieve data through the content resolver code...

} Such operation done for each ContentProvider I retrieved data at backup. I'm not backuping Contacts.Photos, because I don't want to do that. But next, strange thing happening, when i try to attach photo to a contact in Contacts application. First of I select a contact i wish to modify. Then clicking to add icon. Selecting photo, cropping it. And it appears near the contact name in contact editing activity. But after I click "Done" and android says that changes were successfully changed, icon just disappears like i never added it to a contact. And nothing helps after this restore, I tried rebooting my phone, deleting all contacts, deleting all contacts programaticatlly and all this doesn't helps. The only thing that helps is factory data reset. This problem both happens on emulator and on g1 phone. Later i had an idea so I've taken contacts.db file from fresh emulator, where photos feature were still working and saved it. Then i performed backup- restore operations. And compared the databases. They were identical. And still photos weren't inserting anymore. And this problem also happens whether I had any photos added to contacts before backup or all contacts were without photos. So I'm kinda desperate now, because I don't know what to do.

View 2 Replies View Related

Samsung Captivate :: Trouble Synching Contacts From BB To Captivate

Aug 28, 2010

I purchased my Captivate about 3 days ago, and for the most part I love it. Context: I was given a brand new SIM card for it I switched from a Blackberry Bold.The AT&T rep. tried using the machine that connects both phones and synchs contacts from one to the other, but it did not work. My question is: How do you synch contacts from a Blackberry to the Captivate? Before you answer, let me say that I do have a Gmail account and I know the Contacts app can synch with the account, but I do not store my friend's phone numbers on there - and I do not want to individually input each one. Also, I own a Mac and when I had my blackberry I did not back up my contacts on my Mac, and did not have Outlook to back them up onto even if I had tried backing them up - so I cannot simply export my contacts to .csv and load them up to Gmail. There is more I can say (for instance, it seems as if my contacts have been put onto my Captivate, but they're not in the Contacts App that came preloaded with the Captivate...they are, instead, in the folders section under Contacts...how the heck did they get there?!) but I will stop here and see if anyone can guide me through this very frustrating process.

View 7 Replies View Related

Android : Handcent SMS Photos / Contacts Have Their Facebook Pictures

May 26, 2010

I promise I searched. I also looked at the "Here are the similar threads we found:" suggestions.

Anyways. Just got a Moto Droid. Downloaded Handcent SMS. It's great. However the ONE thing I can't figure out, is why do SOME of my contacts have their Facebook pictures, and others don't? I have "synched" with Facebook multiple times. The contacts I have saved have the exact same names as their Facebook profiles, so it should pop up, right?

View 2 Replies View Related

Android :: Full Screen App/Widgets For Music Photos Bookmarks And Contacts?

Jun 20, 2010

Okay so I've moved from Sense to launcherPro. Very happy with it, but I REALLY miss the FULL screen widgets that you get with sense.

I used to have the full screen Music App, the Photo App, Bookmarks, and Contacts taking up some of the sense screens. Now I have 3 blank screens in LP that I want to fill up.

Do you guys know of any full screen Apps/Widgets for Music, Photos, Bookmarks, and Contacts?

View 7 Replies View Related

HTC Desire : How To Add Photos For Email Contacts?

Jul 20, 2010

I tried setting photos for my contacts today, but it seems I can only add photos for my email contacts and not my sim card ones? It's only my contacts on my sim that I want to add photos to! Am I doing something wrong? Or is there a way I can do what I want to without adding everyone's email address?

View 10 Replies View Related

Android :: Change Incoming Call Screen For Unknown Numbers And Contacts Without Photos?

Sep 21, 2010

Is there any way to change the incoming call screen for unknown numbers and contacts without photos? The little robot (foryo or whatever) is a cute logo.. but it looks like a waving dildo.. Often times I have to answer calls in front of customers, family and friends. It's a little embarrassing having to pull a noisy, illuminated, vibrating green dildo out of my pocket every time I get a phone call.

View 5 Replies View Related

HTC EVO 4G :: Want Contacts In Phone Synced With Facebook Photos

Sep 30, 2010

I know this might have been addressed but i just did a search and couldn't get a clear answer. What I want is the have my current contacts in my phone synced with facebook photos. But I do not want the 1,000 friends on facebook to be under contacts. Is there a way to do this?

View 2 Replies View Related

HTC Droid Eris :: Facebook Contacts Photos

Jan 1, 2010

I just set up my Droid Eris to sync my contacts with their Facebook profile so that their photos would show up in my contacts. I synced them all and them matched up properly, but their pictures are not aligned properly. When I first did it, their faces were aligned and everything looked ok, except some pictures were pretty pixelated. But after a few minutes, the pixelation went away and the quality of the pictures was better, except a lot of my contacts have their head not in the photo or just misaligned. More than half are off.I thought at first it was that they didn't set up their picture properly on Facebook, but I looked at their mini pictures (like the ones that show up in the news feed) and their faces were showing up properly. Even their mini pictures on the facebook app are correct. And these seem to be the same size as the pics in my contacts.Why is it that my contacts photos aren't aligned right on some of them and how can I fix this?

View 23 Replies View Related

Samsung Moment :: Facebook Photos For Your Contacts?

Jan 17, 2010

My friend's BB Storm shows all of his contacts with their respective Facebook profile pictures.I would like the same for my Moment.I was wondering if there was an app for that.I couldn't find one through searching. Any ideas?

View 15 Replies View Related

HTC EVO 4G :: Why Photos Assigned To My Contacts Show Up Blurry?

Sep 19, 2010

Does anyone know why the photos assigned to my contacts show up blurry?

View 1 Replies View Related

HTC Incredible :: Widget/app To Show Contacts Without Photos?

Sep 29, 2010

Out of about 900 contacts, only 30 are personal with photos. Is there an app or widget that would allow me to see contacts without a photo placeholder? One of the widgets I love is the favorites people widget, but I can't stand that it has photo placeholders. Of my 800+ business contacts, none have photos so I'm staring at a page of grey faceless dudes.

View 3 Replies View Related

Sony Ericsson Xperia X10 :: Put Photos On Contacts?

Jul 26, 2010

I have just got phone and was wondering how to put photos to my contacts

View 1 Replies View Related

HTC Desire :: Attach Photos To My Contacts In Phonebook?

Apr 6, 2010

How do i attach photos to my contacts in my phonebook?

View 3 Replies View Related

General :: Transfer Contacts With Photos To Another Phone?

Apr 14, 2014

I spent a considerable time and effort attaching photos to all my 100+ contacts. These photos were crops from larger photos so, stupidly in hindsight, I did not preserve any of them. I would like to copy all my contacts, complete with photos, to another phone. Copying the simple contact info is easy via the Gmail export/import procedure, but that does not copy the attached photos. Is there a simple way of copying contacts complete with photos?

View 3 Replies View Related

HTC EVO 4G :: Setting Ringtones To Contacts?

Aug 2, 2010

I have downloaded Mabilo sounds and assign a certain ringtone to my girl.It says it is assigned, but when she calls it goes to the default ringer.How do I keep that ringer assigned to her?

View 6 Replies View Related

Sony Ericsson Xperia X10 :: How To Put Photos To Contacts On Phone?

Jul 23, 2010

i have just got phone and was wondering how to put photos to contacts on phone

View 1 Replies View Related

Samsung Epic 4G :: How To Get Facebook Photos To Sync With Contacts?

Oct 28, 2010

How do i get my facebook photos to sync with my contacts? i searched a little, but it's late and im tired.

View 4 Replies View Related

HTC Hero :: Refreshing Linked Facebook Photos In Contacts

Feb 11, 2010

I spent an hour linking all my mates to their facebook profiles partly so I could have pictures associated with them. However, I accidentally removed my facebook account which reset them all. As it had synced with Google already, I just resynced the links back to my phone, no problems.However, now all the photos have disappeared and short of unlinking and relinking anyone (which will take a long time...), is there a quicker way to refresh their photos?

View 1 Replies View Related

HTC Desire :: Adding Photos To Phone Book Contacts?

Jul 10, 2010

I can't find out how to add photos to the contacts I have on my phone.I read in another post that I should go to Google mail and do it from there, but my contacts aren't synced with anything. I just want to access them on my phone, and see a photo when they call. I added everyone's details myself, but I can't believe there's no Add photo option (or non that I can find anyway!)

View 7 Replies View Related

Sprint HTC Hero :: Facebook Not Linking Photos With Contacts

Jul 5, 2010

Has anyone figured out this problem with facebook not linking photos with contacts? This is annoying...thought this was supposed to be an update not a downgrade

View 3 Replies View Related

HTC Incredible :: Anyway To Sync Photos/updates With People Only In Contacts?

May 1, 2010

Is there anyway to sync photos/updates with people only in your contacts? I dont want to sync my entire facebook friends to phone... and it seems like thats the only way this is a cool feature i dont want to loose!

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved