Reputation: 23
How can I delete all sms in content://sms quickly.
Currently I am using:
while (c.moveToNext()) {
int idi = c.getInt(0);
getContentResolver().delete(Uri.parse("content://sms/" + idi), null, null);
}
but if there are a lot of messages the procedure, it can take a long time.
I need to remove absolutely all messages.
Is there a faster way?
Upvotes: 0
Views: 1473
Reputation: 11038
Haven't tried it, but can you use the Uri of just "content://sms" (without specifying individual message ids)?
Can peek into the content provider code here: https://gitorious.org/0xdroid/packages_providers_telephonyprovider/source/50b2f39df213be0e5a31226582a4792681a9f564:src/com/android/providers/telephony/SmsProvider.java#L485
Upvotes: 1