• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Listener for Contacts API

Helluu there! :D


I'm currently working on a Service, which reads all Contacts and their attributes (like name, phononumber, email, organization etc.) and writes them into a database.

I want the querying and writing to be done 1) the first time in the onCreate() Method and then 2) the next time whenever there is a change in the contacts list.

Now, how do I register a change? What can I use as a trigger to start the service?

Another example: For writing call-logs I used the trigger variable called 'PHONE_STATE' in the TelephonyManager class. The variable changes whenever a new call is made or comes in.


Comments and suggestions are welcome :)
 
Back
Top Bottom