Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Broadcast Receiver for insertion into contacts [duplicate]

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.

like image 363
GOLDEE Avatar asked Feb 07 '13 10:02

GOLDEE


People also ask

What is broadcast receiver used for?

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.

What are the types of broadcast receivers?

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.

What is broadcast receiver example?

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.

What are different ways of implementing broadcast receiver?

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.


1 Answers

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.

like image 197
Anis BEN NSIR Avatar answered Sep 19 '22 05:09

Anis BEN NSIR