1

I am making a small whats app like chat application . As i know whenever a new

contact is added to android device , what's app sends request to what's app server

for verifying that contact number is active on what's app or not , if it is active

it adds what's app icon to that contact. Same thing i want to apply for this .

whenever a new contact is added to contact list , it must send request to

server .

So how can i do this in my app. how can i start new service whenever a new

contact is added .

Plz help . Thank you.

Deepak Rathore
  • 617
  • 8
  • 25

1 Answers1

2

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, which is pretty much what I was looking for.

Source: Broadcast on contact add/change?

In this way, when you know that a contact is dirty, you start a service (or make a broadcast that your receiver will receive).

Community
  • 1
  • 1
An SO User
  • 24,612
  • 35
  • 133
  • 221
  • Hi @Little Child , Thank you for your response . but can you plz tell me how can i get contact no. and contact name of updated contact using RawContacts ? – Deepak Rathore Mar 23 '15 at 07:27