title: Android notify when phone book is updated(Content Observer)
body: <p>I want to get a notification on my phone if there is any change in the contact database(add,delete).Right now i am using ContentObserver to get notified.Following is my code.Problem is that i able not able to know which contact is changed.Can anyone help???</p>
  
  <pre><code>public class ContentObserverActivity extends Activity {
      Button registerbutton;
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
          registerbutton=(Button)findViewById(R.id.button1);
          registerbutton.setOnClickListener(new OnClickListener() {
              @Override
              public void onClick(View v) {
              getContentResolver()
                  .registerContentObserver(
                          ContactsContract.Contacts.CONTENT_URI, true,
                          new MyCOntentObserver());   
              }
          });
      }
  
  
      public class MyCOntentObserver extends ContentObserver{
          public MyCOntentObserver() {
              super(null);
          }
          @Override
          public void onChange(boolean selfChange) {
          super.onChange(selfChange);
              Log.e("","~~~~~~"+selfChange);
          }  
  
          @Override
          public boolean deliverSelfNotifications() {
              return true;
          }
      }
  }
  </code></pre>
  
  <p>Thanks in advance.</p>