I am developing an android application in which I need to delete all messages from inbox. I followed the method of fetching single id and deleting the corresponding message. this works fine when messages in inbox are less. If more number of messages are there it takes a long time. How does In-build messaging application and GoSMS deletes even 4000 and more messages in few seconds when "Delete All" option is selected.
Asked
Active
Viewed 2,256 times
2 Answers
0
I would assume that all the items are removed from the adapter, and placed in a separate thread to delete. To the user all the items are no longer there, but the background thread will still be running.

jimmithy
- 6,360
- 2
- 31
- 29
-
Hi jimmithy, Thanks for your reply. I noticed that once i delete all messages using Delete All option and check the inbox through In-built messaging application, it shows no messages in inbox i hope so both the applications uses the content://sms/ location to populate the messages to display to users. If items are removed from adapter does same adapter exist for GoSMS and in-built messaging app. – Kaarthikeyan Feb 21 '13 at 14:05
0
Here the step:
Backup All SMS using "SMS Backup & Restore" app to your externalCard
Your devices must be rooted
Open root explorer, go to
/data/data/com.android.providers.telephony/databeses/mmssms.db
if you want you can copy the current "mmssms.db" to externalCard for backup too Delete current "mmssms.db" file
Restart phone
Now all your sms will disappear, if you want restore just some of sms threads, you can restore them using "SMS Backup & Restore" app from the backup sms data that already made
Hope this help

zunair
- 1
-
"Restart phone"... - I think this takes more than a few seconds as the OP requested. Also this appears to be a "manual" way to do it, where as the OP is asking for a programmatic way. – Scott Solmer Oct 13 '14 at 18:56