Questions tagged [contactscontract]

Android's Contacts API is defined in the android.provider.ContactsContract and related classes.

The Android platform provides a Contacts API for managing and integrating contacts from multiple accounts and from other data sources.

To handle overlapping data from multiple sources, the contacts content provider aggregates similar contacts and presents them to users as a single entity.

ContactsContract defines an extensible database of contact-related information. Contact information is stored in a three-tier data model: Contacts, Raw Contacts and Data.

More information can be found in the documentation for the ContactsContract class.

551 questions
2
votes
1 answer

I want to create groups for phone contacts in android

Want to create a new group in contacts programmatically I referred the above link but was not able to create group. Should I create a database such that it should show only the groups which I created. Do we have any other way in android?
2
votes
2 answers

Query to android contacts using REGEX expression

I want to make search module just like android keypad that gives the list of contacts with starts with number as well as starts with the text of the keypad user types. basically i want to search contacts with display name as well as number also as…
Rushabh Patel
  • 3,052
  • 4
  • 26
  • 58
2
votes
2 answers

Merging raw contacts

I have an account and a sync adapter which add new raw contacts with corresponding private data entries. the contacts I'm creating are phone number based, meaning I'm creating a new entry per existing phone number. How do I merge my raw contact…
Ofer
  • 127
  • 1
  • 10
2
votes
0 answers

Modify contacts not working ( java.lang.NullPointerException )

I have a problem with editing contacts in Android. I'm using contentProviderOperation with newUpdate, but it's not working. It only works when the field already has something. If I have a field filled, erase it, then save and try to edit it again, I…
2
votes
1 answer

Multiple Contact Picker List

I have a contact picker list with chckboxes of the contacts that have a phone number. Now, my problem is that can't seem to get the checked contact's name and phone number. Here is my code: import android.app.ListActivity; import…
2
votes
1 answer

Android - Create new SIM contact

I'm trying to write a single contact to a SIM card. I've scanned those questions so far: this, this, this, and this. I've obtained the source of this nice library, but still, I don't see exported contacts from apps. And what's worse, I've filled up…
1
vote
1 answer

How to display contact list programmatically in android?

I want to display the phone's contact log directly inside my application on a button click, in order to select a contact and its number. Can anybody help me with this?
1
vote
2 answers

Contact Custom Field doesn't show up in HTC Sense

i wrote a custom syncadapter, which also added a custom field to the rawcontacts. Exactly how it is done in the SampleSyncAdapter or in this example with the last.fm-App. And it is working fine on the emulator. The xml-file, which declares my custom…
Christoph Haefner
  • 1,093
  • 1
  • 9
  • 25
1
vote
3 answers

Android Contacs

I'm able to fetch all the contacts from Contact list in android(phone numbers and emails) but fetching all of them takes long time. To speed up this I have stored them once in my application. But now i can't get the updated contacts. How does they…
1
vote
1 answer

What is replacement for Contacts.People.NOTES?

This is sort of out of curiosity question. Reading through Pro Android 3 book and I came upon Contacts.People.NOTES. Since People is inner class of Contacts class which been deprecated and replaced by ContactsContract I'm looking for NOTES constant…
peter_budo
  • 1,748
  • 4
  • 26
  • 48
1
vote
1 answer

how to get phone numbers for particular group

I'm working on Android contact. I want to query phone numbers (not contact name) from a specific group name. What query should i perform in order to do this?
M Rijalul Kahfi
  • 1,460
  • 3
  • 22
  • 42
1
vote
0 answers

Strange behaviour when calling contact picker activity

Experiencing some strange behaviour when trying to pick a contact and return it to my activity. Everything works except I'm seeing some contacts which should not be displayed. e.g. people I'm following on twitter but have no other interaction with.…
Mr Surfy
  • 61
  • 5
1
vote
0 answers

Android - Add contacts in 1.5

I'm making my application compatible with Android 1.5 (APLI level 3) from 2.3.3. The only thing I have to change (according to the compiler) is the code used to add a contact in the phonebook. The code for 2.3.3 is the following: Intent…
lugeno
  • 1,055
  • 3
  • 10
  • 18
1
vote
1 answer

How to get contact name details for a particular contact

I want the Name of the Contact which includes (FAMILY_NAME, GIVEN_NAME,MIDDLE_NAME,PHONETIC_FAMILY_NAME,PHONETIC_GIVEN_NAME,PHONETIC_MIDDLE_NAME,PREFIX,SUFFIX). I know that column names of the above data that starts with…
KK_07k11A0585
  • 2,381
  • 3
  • 26
  • 33
1
vote
4 answers

Getting illegalargumentException: column 'data1' does not exist in Android

I am trying to put Name and phone numbers from contacts to my customized listView with help of Custom CursorAdapter, But I am getting the following error Exception 11-07 17:53:39.619: ERROR/AndroidRuntime(628): FATAL EXCEPTION: main 11-07…