Questions tagged [rawcontactid]

10 questions
5
votes
2 answers

How to only update contacts instead adding in sync adapter

I have few numbers stored in my apps database. I wanted to match those numbers in contacts app and update that contact with mimetype. Basically how Whatsapp does. They sync all contacts and their app icon comes in contact. I have done sync part and…
4
votes
1 answer

Unable to identify WhatsApp contacts

I'm trying to write an Android program which can identify if a given contact number is associated with WhatsApp or not. I managed to find out if a particular contact name has WhatsApp account or not. How can I find out which contact corresponding to…
3
votes
4 answers

How to get the ID of the contact on Windows Phone contact list?

I want to get ID of Contact List Application... Currently I am using class named PhoneNumberChooserTask like Chooser Class but I get only Number, Name, FullName. etc.. but how to get ID of that contact?
3
votes
2 answers

Getting RawContact id using Contact id

I have built the following method to obtain the id from the RawContacts table using the id obtained from the Contacts table.This method fails thrwoing an Exception. public int getRawContactId(int contactId) { String[] projection=new…
vamsiampolu
  • 5,355
  • 15
  • 65
  • 161
1
vote
1 answer

can raw contact ids of 2 contacts be same in android..?

I know CONTACT_Id's are different. but are RAW_CONTACT_ID's are also unique for each contact..?
ngesh
  • 13,044
  • 4
  • 41
  • 59
1
vote
1 answer

How to add city field to a contact in Android using ContentProviderOperation

I'm creating a contacts app that will have all the basic features of a Contacts app (and some extra features of course). While implementing the basic features, I'm stuck at a place: I'm having an activity in which the user can change the city name…
1
vote
1 answer

writeDisplayPhoto() changes the photo of another contact

I'm trying to set contact photo by using the function in the official android docs here,but the function changes the photo off completely different contact although i check the contactURI and contactID and use it to get the contact name and still…
1
vote
2 answers

How to set default image to Android phone contact that has no previous image

I have a piece of code which updates the an Android contact´s image, the problem is that it doesn't work when the contact has no previous image. I also checked that the contact was from "Phone" account or "*@gmail.com" account. When it already has…
1
vote
1 answer

Picking the correct rawContactID when adding a new number to existing contact

I am building a custom phonebook application. As part of this, I need to add new contacts, or additional info (phone numbers or emails) under existing contacts. While this works well under simple test cases, there are certain situations (and it's…
0
votes
1 answer

Android: adding a birthday event to an android contact programmatically

I am trying to birthday information to a contact. I use lookupkey to identify my contacts (as it is safer than just relying on contactId). In order to be able to insert the Event into the database i need a raw_contact_id ... so i'm trying to get…
laurentiugh
  • 73
  • 1
  • 1
  • 8