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

Android - cannot update listview with filtered results from edittext string

I'm experiencing some problems filtering contacts on the phone by the search string typed by the user in an edittext. It seems like it's filtering well, but the problem is that the filtered ListView contains the same initial contacts as the ALL…
The Condor
  • 1,034
  • 4
  • 16
  • 44
1
vote
0 answers

Adding a new field to the contacts app

I understand that a new contact and additional info regarding the contact can be added into the native contacts app using a contacts intent. But can we create an entirely new field to the contacts app and add info to it from another app? Or by…
1
vote
1 answer

Add a contact in a specific group by id of group

I need to insert a contact inside a group. I have id of the group. The contact is insert inside account but not inside the group specify. I don't know why. Anyone can help me? ArrayList ops = new…
Ricardo Filipe
  • 435
  • 4
  • 8
  • 24
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…
1
vote
2 answers

Invalid column data4 in contacts cursor

I'm trying to create a class, its fields being Contact Info (name, address, etc). public class ContactObject { private Activity actividad; private Uri contactUri;`enter code here` // variable para asegurarse que la consulta de contacto se realizó…
Frank
  • 2,777
  • 5
  • 18
  • 30
1
vote
1 answer

Retrieving all Contacts that have a specific Account attached to them

I am making a communication app that has been set up with a specific Account type in the AccountManager and has a SyncAdapter attached to it. Several of my contacts have a RawContact which has a MIMETYPE of my new account and some associated data. I…
Glenn.nz
  • 2,261
  • 2
  • 17
  • 20
1
vote
2 answers

get contacts those are not related to any group

I am working on the displaying the contacts group wise in android application. So I got all the group contacts from the particular group but now I want to get the contacts those are not in any of the group (NOT ASSIGNED). So what can be the value of…
Rushabh Patel
  • 3,052
  • 4
  • 26
  • 58
1
vote
1 answer

Edit Contact URI is not working in android 4.0 and above

I have developed one code to edit contact but it is not working in the android 4.0 and above. Activity of edit is starting but closes immediately and backs to the parent activity.Do not know what is the problem, here is my code: Intent i = new…
Rushabh Patel
  • 3,052
  • 4
  • 26
  • 58
1
vote
1 answer

Exception on SG SIII and Note 2 with JB update while using Contacts API

I'm developing an app that uses Android Contacts API. My code works ok but recently new errors in Play Market Feedback started to appear. Looks like theese errors show up only on SGS3 and Note2. java.lang.RuntimeException: An error occured while…
nixan
  • 523
  • 1
  • 6
  • 13
1
vote
1 answer

Adding 1 digit to every single phone number in Android

I want to create a function to edit every single number in my address book in android, however all the examples I found only edit 1 number of the contacts, so if the contact have more than 1 number they won't be edited. For example: Amy has this…
1
vote
1 answer

How to get all sync contacts(google + facebook) in android

I have used cursor for getting all contacts from android contact list as : ContentResolver cr = getContentResolver(); Cursor cur = cr.query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null); if (cur.getCount() > 0) { …
Naresh J
  • 2,087
  • 5
  • 26
  • 39
1
vote
3 answers

Android - cant get phone number of some contacts

I'm having a problem with extracting phone numbers of some people in my contact list. First I show all the contacts in a listview: String[] projection = new String[] { ContactsContract.Contacts._ID, …
nbtk
  • 3,039
  • 4
  • 21
  • 19
1
vote
0 answers

How to get Android contacts more quickly

I need to find the contacts on a phone. Here's my code: Uri uri = ContactsContract.CommonDataKinds.Phone.CONTENT_URI; Cursor cursor = context.getContentResolver().query( uri, new String[] {…
1
vote
2 answers

ndroid.database.sqlite.SQLiteException: no such column: title: , while compiling:

Hy everbody. I need help in my query. I receive a warning but I don't know what is wrong. android.database.sqlite.SQLiteException: no such column: title: , while compiling: SELECT _id, display_name FROM view_data_restricted data WHERE (1) AND…
1
vote
1 answer

Android and SQLite : is there no good way to join queries with the ContactsContract API

I feel as though I may be missing something in the ContactsContract API. In my application I have several SQLite tables with references to Contacts or Groups (from the ContactsContract API). I did this rather than reinvent the wheel with my own…
adam.baker
  • 1,447
  • 1
  • 14
  • 30