Like the Message application, the first action displays the last SMS, grouped by person, and account number.
Example: I exchanged 50 texts with Chris, 60 with Alina, 40 with Rei ... The application displays something like this
Chris (50) Hey how are you lately ?
Aline (60) Let catch up
Ray (40) Here is my number
Ethan (1) I wrote a solution
I am trying to do the same. I request all SMS, then sort them. At least this is O (n) efficient.
Cursor cur = this.getContentResolver().query(Uri.parse("content://sms"), null, null, null, null);
int count = cur.getCount();
for (int i=1 ; i<=count ; i++){
....
cur.moveToNext();
}
Is there a way to request the latest messages (received or sent without a draft), grouped by person and receiving the amount of SMS from the person? I assume there are several queries.
source
share