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?
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.