2

In my app, I have a service in which I want to listen for any changes in contacts i.e., when any contact is added or edited in the native contacts app or through any other app. Is there any broadcast intent which I can register to for this purpose? Or is there any other way to achieve this?

Vikram Gupta
  • 6,496
  • 5
  • 34
  • 47

1 Answers1

0

Found someone with a similar problem, his solution was using RawContacts.

Broadcast on contact add/change?

http://developer.android.com/reference/android/provider/ContactsContract.RawContacts.html

Community
  • 1
  • 1
atomman
  • 2,510
  • 1
  • 16
  • 27
  • 3
    That is not helping me. That guy used the sync service which is not guaranteed to do the job. As he says - "Whenever the sync service is started. The OS might start your service automatically after adding a contact, but that's not guaranteed. I suppose you could register a content observer (see ContentResolver.registerContentObserver), but I think that would require you to have a Service running at all times when the device is awake (please stop it when the device goes to sleep)." – Vikram Gupta Dec 27 '12 at 11:28