I use
Uri.parse("content://sms/inbox")
when executing
getContentResolver().query
I want a selection that will always return messages from within the last 10 days of the current system date. Please help with the correct SQL statement.
Embarrassing to have to answer my own question but here goes...
long daterr = new Date(System.currentTimeMillis() - 10L * 24 * 3600*1000).getTime();
Cursor cursor = getContentResolver().query(uriSms, new String[]{"_id", "address", "date", "body"}, "Date > ? ", new String[]{""+daterr}, "date ASC");