我想在指定日期之后获取设备的消息(发送和接收) 。我正在使用以下逻辑来获取消息,但我无法为 where 条件编写逻辑。我该如何解决这个问题?
Uri uriSMSURI = Uri.parse("content://sms/");
String WHERE_CONDITION="";
//Cursor cur = getContentResolver().query(uriSMSURI, null, null, null, null);
Cursor cur = getContentResolver().query(uriSMSURI,
new String[] { "_id", "thread_id", "address", "person", "date", "body" },
WHERE_CONDITION,
null, null);
while (cur.moveToNext()) {
address.add(cur.getString(cur.getColumnIndex("address")));
body.add(cur.getString(cur.getColumnIndex("body")));
id.add(cur.getString(cur.getColumnIndex("_id")));
date.add(cur.getString(cur.getColumnIndex("date")));
}