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
0
votes
0 answers

Contact photo not updating for a select few

I was recently playing around with some code that goes through my contacts and creates an identicon for any contact that does not have a photo set. For the most part this ended up working quite well but for some reason I have a handful of contacts…
clark
  • 507
  • 7
  • 14
0
votes
1 answer

Show Contact's Photo from retrieve SMS

I am able to retrieve SMS conversation from the query properly and it is working. Now I would like to add photo of particular contact? I was able to get the contact's display name by putting the following: Cursor cs=…
TheDevMan
  • 5,914
  • 12
  • 74
  • 144
0
votes
1 answer

Error: querying contacts database and bind it to multiautocompletetextview

I got this error 08-20 22:22:54.705: E/AndroidRuntime(15774): FATAL EXCEPTION: main 08-20 22:22:54.705: E/AndroidRuntime(15774): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.john/com.example.john.MainActivity}:…
RieJack
  • 51
  • 2
  • 10
0
votes
1 answer

Reading contact without using activity

Im developping an library that read,list,add and search contacts in the phone. I did it using Activity,cursor and managedQuery. But to have a complete indepandant library i have to do it with out using an activity. Is it possible to have a contact…
0
votes
1 answer

How can I avoid facebook, watsapp contacts in ContactsContract.CommonDataKinds

Om Button click, I am showing contact chooser box. From where I choose any of the contact. And then showing contact's phone number. But the issue is, sometimes I don't see the phone number after selecting a contact. I don't know the reason, but I…
ravi tiwari
  • 521
  • 1
  • 8
  • 24
0
votes
1 answer

Storing multiple contact numbers under same tag

I was just wondering how are multiple contact numbers stored under same tag in android. For example, I could store 9876543210 and 9812345670 under the same tag TYPE_HOME or TYPE_MOBILE. But while storing a number programmatically, I could only…
Pankaj Singhal
  • 15,283
  • 9
  • 47
  • 86
0
votes
1 answer

Get contacts from SQL database by certain criteria on Android

How do I query all contacts matching a certain criteria on Android? Let´s say, I want to have all contacts, which have a name, a phone number, but no profile picture. As I understand the SQL thing, I need some kind of selection, which is passed to…
Marian Klühspies
  • 15,824
  • 16
  • 93
  • 136
0
votes
0 answers

How to load photo from each contact in android

By the following code I can load contact names and emails, but I want to get the picture path of that contact too, so that I can show that image on imageview on each listview item. Have seen few posts like this, but I am unable to understand how it…
Spike
  • 147
  • 3
  • 17
0
votes
0 answers

Contact picture for the Call Log in android

I am developing an android application, in which I am displaying call Logs and the Details of the calls. I want to display the contact picture in the call Log. I am able to get the contact ID and the uri from the Contact id but I am getting the…
LISA
  • 63
  • 2
  • 7
0
votes
2 answers

how to insert a progress bar into my apps in android

I am new to the android.Here I am create the apps such as read the phone contacts and stored into the csv file format file .It takes a long time to read contacts..In mean time i am need to use the progress bar until the file is writing the contacts…
0
votes
0 answers

getting email from Android phone contacts

Please, I've been trying all day to get the email address of all the contact on a phone but somehow, i can't get it to work. Please can someone tell me where am going wrong.. all others work except getting the email. Thanks in advance Cursor cursor…
uchman21
  • 678
  • 3
  • 6
  • 22
0
votes
1 answer

Android Contact Picking Uri

I have a string content//com.android.contacts/contacts/contacts/2 ie aft the user has selected a particular number. From this string, how do i get the phone number of this particular contact? I am new to android environment, so my question might…
Hermoine
  • 1
  • 1
0
votes
1 answer

Query contacts details skipping synched contacts by other applications

I am doing a query to retrieve contacts details (specifically their postal address) via ContactsContract. The point is that I would like to skip the contacts that are synchronized from other applications like WhatsApp, LinkedIn, Skype,... My code…
atxe
  • 5,029
  • 2
  • 36
  • 50
0
votes
1 answer

Erroneous contact data retrieved from android contactlist - How to correct?

I am experiencing some unusual behaviour from my app - I cannot fathom why, but when a user selects a contact from my listview, the contact which is later retrieved from the handset is somehow not the one the user chose... UPDATED New code, still…
anthonyhumphreys
  • 1,051
  • 2
  • 12
  • 25
0
votes
1 answer

How to use listview and contacts to create local list of contacts?

Using the following code I am populating a listview with contacts' names and a corresponding checkbox. At the moment, the code just spits the whole list into the log. I intend to take selected contacts from the list and store them locally so they…
user1593869
  • 37
  • 1
  • 7