Skip to content Skip to sidebar Skip to footer

Android: Get Updated And Deleted Contact Only

I am developing an application in which i am working on Android Contacts and not able to move ahead. In app the need of application is that the contact which is updated should send

Solution 1:

use the below query to get all the deleted and updated contacts.

public static final String ACCOUNT_TYPE = "com.android.account.youraccounttype"
public static final String WHERE_MODIFIED = "( "+RawContacts.DELETED + "=1 OR "+
            RawContacts.DIRTY + "=1 ) AND "+RawContacts.ACCOUNT_TYPE+" = '"+ ACCOUNT_TYPE+"'";

c = contentResolver.query(ContactsContract.RawContacts.CONTENT_URI,
                    null,
                    WHERE_MODIFIED,
                    null,
                    null);

Post a Comment for "Android: Get Updated And Deleted Contact Only"