how to know updated , deleted code in contact list using contact observer?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/5996921/how-do-i-make-my-android-contentobserver-for-contactscontract-detect-a-added-up">How do I make my Android ContentObserver for ContactsContract detect a added, updated or deleted contact?</a>  </p>
</blockquote>



<p>// i have use contact observer it works but i am not able to know the exact contact that has been updated or deleted.
// i just want to know how to acknowledge the updated contact.
// i have use Uri that works but cant fetch id and deleted contact.</p>

<pre><code>   public class ContactObserver extends  ContentObserver{
        public static String id=null;
        public static String flag=null;
            Context mContext;
            Uri lookupUri = Uri.withAppendedPath(ContactsContract.Contacts.CONTENT_LOOKUP_URI, ContactsContract.Contacts._ID);
         public ContactObserver(Handler h,Context context) 
         {
              super(h);
              mContext = context;
         }
         public boolean deliverSelfNotifications() {
                return true;
            }

            public void onChange(boolean selfChange) {
                  final String[] projection = new String[] {RawContacts._ID, RawContacts.DELETED,};
                    Cursor curval = mContext.getApplicationContext().getContentResolver().query(RawContacts.CONTENT_URI, projection, null, null,null);
                    if(curval!=null)
                    {
                        if(curval.moveToNext())
                        {
                             id = curval.getString(curval.getColumnIndex(RawContacts.Entity._ID));
                         flag = curval.getString(curval.getColumnIndex(RawContacts.DELETED));


                        }
                    }


            }



    }
</code></pre>
