I am new to android programming,i want to perform specific actions whenever a new contact is added to android device,In broadcast receivers,we have actions like BOOT_COMPLETED
,similarly can we something for new contacts added,please help
Thanks in advance
Asked
Active
Viewed 373 times
0
2 Answers
0
The Solution is using the RAWContacts
There's no broadcast when a contact is added/changed. However, when you look up your contacts in the RawContacts
table you have a DIRTY
column which is 1
if the contact was changed since the last sync
.
You can check
http://developer.android.com/reference/android/provider/ContactsContract.RawContacts.html
for more information

Anchit Mittal
- 3,412
- 4
- 28
- 48
0
have a look at this question and answer, this may help you Phonebook Update.
This answer uses ContentObserver
Also you can use SyncAdapters from this answer.