1

When we delete a contact from contact manager it set the RawContacts DELETED flag to "1".

In emulator when I delete a phone contact it is showing DELETED flag "1", but when I delete a phone contact from Samsung device it is showing that flag "0".

Can anybody explain why this is happening ?

EDIT:

This is the code:

public static final String WHERE_DELETED = "( " + ContactsContract.RawContacts.DELETED + "=1 )";

Cursor cursor = context.getContentResolver().query(ContactsContract.RawContacts.CONTENT_URI,
    null,
    WHERE_DELETED,
    null,
    null);

while(cursor.moveToNext()) {

    String id = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts._ID));
    String name = cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));

    Log.d("Contact ID", id);
    Log.d("Person Name", name);
}
Amrat Singh
  • 331
  • 2
  • 13

0 Answers0