BroadcastReceiver for when sent SMS messages are deleted?
Is there a broadcast event for when the user deletes everything inside the phone's sent SMS folder? I need to be able to trigger an action when the user clears her sent box.
If not the entire sent box, at least the messages individually--that is, do something when this particular sent message has been deleted.
I had to change my approach to this problem in my app and no longer need a listener for when SMS messages are deleted, but it might help to:
- Create a ContentObserver that listens to the Uri content:\\sms.
- Do something from the ContentObserver when onChange() is executed. For example, you might want to traverse all the messages in the inbox (via Cursor) and check which messages are missing. That of course requires you to have an archive of messages that were present in a previous check.