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
2 answers

Best way to access all the details of android contacts

I am writing an application to sync contact details with my server. For this I need to query Contacts using content provider multiple times as all the data is not present in one table. For example by using contact id, I have to query separately to…
0
votes
1 answer

Adding a new account on android restricted the number of contact fields

After running SampleSyncAdapter, a new account was created successfully and I was able to sync my contacts with the server but when I added a new contact it showed me only two fields i.e first name and last name. All the other fields were hidden.…
0
votes
2 answers

in Android 2.0 or later, is it possible to identify all the raw contacts from which a single aggregate contact is formed?

as far as you might know, there are contacts (aggregate contacts) which are formed by aggregation of two or more raw contacts in Android V2.x is it possible to identify all the raw contacts from which a single aggregate contacts is formed through a…
Rupesh
  • 3,415
  • 2
  • 26
  • 30
0
votes
1 answer

Contact Selector

I've been working on this single function for my intro to Comp Eng Mobile App Class, for about a week, starting to understand Cursors, contentresolvers, and adapters. But the code, recognizes I never use a cursor, but I don't know how to…
Dan
  • 554
  • 2
  • 10
  • 18
0
votes
1 answer

Retrieving Android Contacts

ContentResolver cr = getContentResolver(); Cursor cur = cr.query(ContactsContract.Contacts.CONTENT_URI, null, null, null, null); if (cur.getCount() > 0) { while (cur.moveToNext()) { String id = cur.getString( …
adoo42
  • 9
  • 2
0
votes
1 answer

Is there an intent fired when a new contact is added to the contacts provider?

I'm looking for a way to get notified when a new contact is added (or changed) in the device db. From looking in the documentation it looks like there are a lot of intents used to start activities that add contacts or attach photos but there isn't…
Guy B.
  • 611
  • 5
  • 10
0
votes
4 answers

null pointer exception in list view?

hie,I am trying to retrieve contacts name and their type .I want to put them in list view ,but getting null values at name and phone type array,as well as in list view.any help would be appreciable.thanks in advance. package…
0
votes
1 answer

How to update Contact without removing already stored data?

I'm trying to do a sync adapter to sync my contacts with an webstorage. When I ask this server for any contactupdates on the server-side I get a list of all the new informations added/changed. To update them I'm using the preferred method described…
Christoph Haefner
  • 1,093
  • 1
  • 9
  • 25
0
votes
1 answer

All contacts that have more than one phone number

I'm trying to get all the contacts that have more than one phone number. Using sqlite3, I queried the database like this: select number,name,person,type from view_v1_phones where person in (select person from view_v1_phones group by person…
zorglub76
  • 4,852
  • 7
  • 37
  • 46
0
votes
1 answer

Android cursoroutofboundexception

I am doing a simple app, I have an edittext field and a button, the button has an onclick event. The code is as shown below: private static final int CONTACT_PICKER_RESULT = 1; public void doLaunchContactPicker(View view) { Intent…
sankara rao bhatta
  • 649
  • 5
  • 9
  • 13
0
votes
1 answer

What is the recommended way to keep a list of contacts accessible only to my app?

I am building an application that needs to keep an list of contacts. That list will be built by inserting data by the user directly or by selecting from Android contacts. But my list of contacts must not be accessible from outside my application…
Persimmonium
  • 15,593
  • 11
  • 47
  • 78
0
votes
2 answers

Android Launching Contacts Application

I wanna launch the Contacts application from my application Activity. I am not able to understand how to do it. Button contact = (Button) findViewById(R.id.contact); contact.setOnClickListener(new View.OnClickListener() { public void…
Harsha M V
  • 54,075
  • 125
  • 354
  • 529
0
votes
3 answers

formatted string phone number android

I am currently exporting some of the phone numbers of contacts stored in the Contacts content provider, and I would like to know if something exists to get the 'formated' string for the phone number e.g. instead of xxx-xxx-xxxx => xxxxxxxxxx. for a…
olamotte
  • 917
  • 9
  • 20
0
votes
1 answer

Why do I get a force close error when clicking on a contact from list? (Android App Development)

I'm a complete noob in android app development, so I need some help from any expert out there. I found some code online to display the contact list when clicking on a EditText. I understand most of the code so far but the problem is when I select…
SReca
  • 643
  • 3
  • 13
  • 37
0
votes
1 answer

IS NOT NULL is still returning null values in my query

I am using Loader for a query using CursorLoader and the appropriate parameters to derive values. I am using a recyclerview to display data. Without the use of IS NOT NULL in my SELECTION parameter, which is the same as a WHERE clause my…
NVA
  • 1,662
  • 5
  • 17
  • 24