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
1 answer

Getting "java.lang.illegalArgumentException: invalid column data1"

I need to add a contact in a contacts group. The group is added but the contact is not added in the group. Here is my code. I think the exception occurs in ContactsContract.CommonDataKinds.GroupMembership.GROUP_ROW_ID but i don't know why.. Can…
0
votes
2 answers

It's possible to edit activities of the system Android?

Someone knows if it's possible to edit a system activity in android? For example insert a new EditText in the activity of the ContactContracts.people..... If it's possible, how can i do? Thanks
Ricardo Graça
  • 581
  • 2
  • 9
  • 17
0
votes
2 answers

Load a contact's picture into ListView (part 2)

I have modified the code in this question ,according to the answers there, in order to load contact's picture on a ListView. I am getting the Photo_id, and use it to get the Bitmap of the contact, using loadContactPhoto(ContentResolver cr, long id)…
Alex Styl
  • 3,982
  • 2
  • 28
  • 47
0
votes
1 answer

how to show detail data contact by click name in listview android?

contactmanager.java protected void onListItemClick(ListView l, View v, int position, long id) { super.onListItemClick(l, v, position, id); Intent i = new Intent(this, ContactEditor.class); String projection = new…
0
votes
1 answer

how to get the group id of a contact in android

I want to get the group id of each contact in my android application.I have initial query like this Cursor cursor = cr.query(Phone.CONTENT_URI, new String[] { Phone.CONTACT_ID}, null, null, null); And what i do is…
sampathpremarathna
  • 4,044
  • 5
  • 25
  • 37
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
  • 83
  • 1
  • 1
  • 8
0
votes
1 answer

App running on HTC but Not on samsung for android (Related to Contacts)

I have created an application for ContactsContract... I have created a spinner which brings all the accounts configured and hence the user can pick up the contact type say, gmail(com.google), phoneBook and so on.... Now, If I select phoneBook, then…
kanchan
  • 77
  • 3
  • 11
-1
votes
1 answer

Just how good is Android's ContactsContract.PhoneLookup class?

Phone numbers can be expressed lots of different ways: 555-555-5555 1-555-555-5555 +1-555-555-5555 Are all the same number, just expressed differently. Android's ContactsContract.PhoneLookup class Is designed to solve this problem. I'm about to…
JMRboosties
  • 15,500
  • 20
  • 76
  • 116
-1
votes
1 answer

Retrieve contact on Android with name matching given string and dial that contact's phone number

I've been having difficulty implementing the retrieval of the phone number of a contact whose name matches a given string and then dialing that number. I know this is possible because many existing apps include this feature. How can it be…
hb22
  • 383
  • 1
  • 2
  • 14
-1
votes
1 answer

Getting error when insert birth date into a database

I'm trying to insert contacts details to a MySQL database, Here is my code : public void SyncContact(){ ContentResolver cr = getContentResolver(); Cursor phones = cr.query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null, null,…
Manish Dodiya
  • 35
  • 1
  • 4
-1
votes
1 answer

Retrieve all numbers from one contact issue

I know this is a common question since I found many answers about it, but I still have an issue regarding phone number retrieving. I want to get ALL numbers from one contact picked from the PICK_CONTACT activity. Here is my code from the…
GrayFox
  • 824
  • 2
  • 10
  • 27
-1
votes
1 answer

displaying contacts in gmail and phone's contact using Cursor android

I tried to display contacts from phone in my app, But its showing both contacts from gmail and phone. But my emulator only shows phone contact not gmail contact. How to avoid gmail contacts not to be selected. I need only contacts from…
Jithin Varghese
  • 2,018
  • 3
  • 29
  • 56
-1
votes
1 answer

How can I check whether a given phone number is saved in my contacts with little time consumption?

I have some contact numbers saved in a remote server and I have more than 100 numbers saved on my Android phone. What I want to do is compare the numbers present on the remote server and the phone numbers in the Android phone and display only the…
anu_r
  • 1,602
  • 7
  • 30
  • 61
-1
votes
1 answer

updating phone contact not working

I'm tryingt ot extract my contacts and apply so changes on them but the problem is that my builder seems like it's working fine and not throwing any exception but there are no changes ! Cursor c; ArrayList ops = new…
-1
votes
1 answer

How to save a contact from my application, which is stored in my database in the phone contacts?

I have an application in which customers are recorded and stored in my database. You need to by pressing the button, the selected contact remained in phone contacts. Help please. The problem is that only reads from the database columns name and…
Zloyel
  • 95
  • 1
  • 4
  • 14
1 2 3
36
37