在我的应用程序中,我想通过手机联系,我想在CONTACT_LAST_UPDATED_TIMESTAMP
上过滤它,请帮助我怎么可能?
我的查询是:
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);
但此查询返回0原始计数。请告诉我是否正确的过滤方式?
答案 0 :(得分:3)
我提出了自己的问题答案:
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);