Reputation: 1783
When I query the SMS provider in Android I get the messages in from the older ones to the most recent ones. I am using the following query:
Cursor cursor = getContentResolver().query(messagesUri,null,null,null,null);
Is it possible to sort it the opposite way?
Upvotes: 3
Views: 3549
Reputation: 1783
The solution is to transform the last argument from null
to date ASC
:
Cursor cursor = getContentResolver().query(messagesUri,null,null,null,"date ASC");
Upvotes: 7