Below are my current codes:
private int deleteAllMessages(Context context){
Uri deleteUri = Uri.parse(SMS_ALL);
int count = 0;
Cursor c = context.getContentResolver().query(deleteUri, null, null, null, null);
while(c.moveToNext()){
long thread_id = c.getLong(1);
Uri thread = Uri.parse("content://sms/conversations/" + thread_id);
context.getContentResolver().delete(thread, null, null);
}
return count;
}
I want to know what does this statement mean:
Cursor c = context.getContentResolver().query(deleteUri, null, null, null, null);
And also, how can I change it to delete only specific message (that has been processed) and not delete all messages at inbox.
Any help?
I use following code to download SMS from my inbox,