private static final Uri SMS_URI = Uri.parse("content://sms"); private static final String[] COLUMNS = new String[] {"date", "address", "body", "type"}; private static final String WHERE = "type = 2"; private static final String ORDER = "date DESC";
// ... ContentResolver cr = getContentResolver(); Cursor cursor = cr.query(SMS_URI, COLUMNS, WHERE + " AND date > " + timeLastChecked, null, ORDER);