Reputation: 3553
In my application i want to get contact from phone and i want to filter it on CONTACT_LAST_UPDATED_TIMESTAMP
please help me how can it possible?
my query is :
Cursor crr = cr.query(
ContactsContract.CommonDataKinds.Phone.CONTENT_URI,
new String[] {ContactsContract.CommonDataKinds.Phone.CONTACT_ID
ContactsContract.CommonDataKinds.Phone.CONTACT_LAST_UPDATED_TIMESTAMP,
ContactsContract.CommonDataKinds.Phone.DATA_VERSION,
ContactsContract.CommonDataKinds.Phone.CONTACT_LAST_UPDATED_TIMESTAMP + " = ?",
new String[]{" > '1455531760472' "}, null);
but this query return 0 raw count. please show me is it right way for filter or not?
Upvotes: 1
Views: 1125
Reputation: 3553
I put my own question's answer :
Cursor crr = cr.query(
ContactsContract.CommonDataKinds.Phone.CONTENT_URI,
new String[] {ContactsContract.CommonDataKinds.Phone.CONTACT_ID
ContactsContract.CommonDataKinds.Phone.CONTACT_LAST_UPDATED_TIMESTAMP,
ContactsContract.CommonDataKinds.Phone.DATA_VERSION,
ContactsContract.CommonDataKinds.Phone.CONTACT_LAST_UPDATED_TIMESTAMP + " > ?",
new String[]{"1455531760472"}, null);
Upvotes: 3