I am trying to launch an application after successful saving of contact in androids in built contact Phone book. so I want to know ,is there any Broadcast Receiver for updation in phonebook and addition of new contact in phonebook.
Or any other way to find the event of addition or updation in phonebook.
A broadcast receiver (receiver) is an Android component which allows you to register for system or application events. All registered receivers for an event are notified by the Android runtime once this event happens.
There are two types of broadcast receivers: Static receivers, which you register in the Android manifest file. Dynamic receivers, which you register using a context.
Broadcast in android is the system-wide events that can occur when the device starts, when a message is received on the device or when incoming calls are received, or when a device goes to airplane mode, etc. Broadcast Receivers are used to respond to these system-wide events.
This file can include each of the fundamental life cycle methods. We have added broadcastIntent() method to broadcast a custom intent. You can try implementing other BroadcastReceiver to intercept system generated intents like system boot up, date changed, low battery etc.
You have to implement an Android Service and register an observer to the list of Contact, you can refer to this question to receive change event on the phonebookContact Change. After that you can start you application. You can make your service run on device restart by using brodcast receiver for boot.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With