Questions tagged [rawcontacts]

39 questions
24
votes
2 answers

What is the difference in contacts versus raw-contacts?

I have a "dump" utility that I am using to study the ContactsContract since I don't quite get it in the documentation. When I dump the contacts it counts 263 records in the table, however, the contacts application on my device lists that I have 244…
mobibob
  • 8,670
  • 20
  • 82
  • 131
11
votes
1 answer

Add RawContact so it aggregates to an existing contact

I am trying to add a new RawContact to an existing Contact so my custom data field shows up inside the original Contact. I tried Adding a StructuredName Data row to my new RawContact with a DisplayName that matches the DisplayName of the original…
vbsteven
  • 616
  • 6
  • 13
5
votes
1 answer

Contacts backup and sync application

I am working on a contacts backup and sync. The target is to send all details of all contacts to a server (custom protocol defined) as a backup. During initial launch of application, all the contacts will be queued and sent to the server. And after…
Udayan
  • 1,374
  • 1
  • 11
  • 20
4
votes
2 answers

Query Android contact to get ACCOUNT_TYPE and ACCOUNT_NAME

I am able to obtain a list of contacts and their basic information like: name. phones, emails, ims, notes, organizations for backup purposes by using ContactsContract.Contacts.CONTENT_URI for a list of Contacts and other specific URIs for different…
Alin
  • 14,809
  • 40
  • 129
  • 218
4
votes
4 answers

Get a URI for a RawContact photo in Android

I know I can get the URI of a contact's photo using: Uri person = ContentUris.withAppendedId(Contacts.CONTENT_URI, contactId); Uri photoUri = Uri.withAppendedPath(person, Contacts.Photo.CONTENT_DIRECTORY); Is there a way to do the same for a…
marmor
  • 27,641
  • 11
  • 107
  • 150
4
votes
1 answer

difference between RawContacts.CONTENT_URI and ContactsContract.Contacts.CONTENT_URI in android

what is the difference between RawContacts.CONTENT_URI and ContactsContract.Contacts.CONTENT_URI in android? I am trying to write a service which listens to changes in native address book. So, which one to use? thanks Niz
Nizzy
  • 1,879
  • 3
  • 21
  • 33
3
votes
2 answers

Insert RawContact with a specific contactid

I am trying to create a rawcontact in android that has a specific contact id, so it is linked to other rawcontacts with the same contactid (not rawcontactid). The problem is I am unable to insert the Contact_ID into the…
3
votes
0 answers

Inserting new RawContact without setting Dirty flag to 1

I'm working on an app which Syncs contacts with a backend. When you delete the app the contacts will be deleted, but when you re-install the app the contacts will be restored from the backend. After initial sync I don't want the contacts to be…
Roel
  • 3,089
  • 2
  • 30
  • 34
3
votes
0 answers

how to query the rawcontacts ,excluding from the list of "not assigned" to any group in android

I'm backing up and restoring my contacts, I want to query only those contacts, which the user sees in the contacts default application list. I'm using samsung duos, there is a group name called "Not assigned" in groups tab in default(samsung)…
2
votes
0 answers

Adding Contacts Android 2.3 rawContactId

I'm new to java and developing apps, I can't figure out how to add a contact. I'm taking right from the android development website: ContentValues values = new ContentValues(); values.put(Data.RAW_CONTACT_ID, rawContactId); …
Jonathan
  • 21
  • 2
2
votes
1 answer

Contacts getting duplicated while adding raw contact based on phone number

I am trying to add raw contacts for each of the phone numbers associated with all contacts in the Android contact list. When certain contacts have multiple phone numbers associated with it, android contact list shows the same contact multiple times.…
muhsin ct
  • 21
  • 2
2
votes
1 answer

How to display phone contacts only (exclude SIM contacts)

I'm building an UI where I need to show a list of phone contacts in a list view. I'm using ContactsContract.Data and the CursorLoader to load the data and then binding the cursor to a custom adapter (extended off of SimpleCursorAdapter). The issue…
Jay Sidri
  • 6,271
  • 3
  • 43
  • 62
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…
1
vote
1 answer

How to get last inserted RawContacts ID after newInsert into address book programactically?

I succeeded in inserting contacts into the address book and I need to save a reference of the contact in my app. I figured that the best way to save the reference is to get the RawContacts ID itself. Is there a way for me to directly get the ID back…
Creniale
  • 238
  • 3
  • 16
1
2 3