I created a BroadcastReceiver and configured it with an android.provider.Telephony.SMS_RECEIVED action filter so it is called everytime the phone receives a text.
Is there some event/action or other way for my application to be notified whenever the phone sends a text (preferably independent of the application that sends it)?
So far the only option I see is to poll the content provider for content://sms/sent which doesn’t even give me all sent texts because applications can choose not to put it there.
Unfortunately there is (currently) no way to implement a
BroadcastReceiverbecause the standard sms application uses aSmsMangerto send the messages but specifies concrete internal classes for the sent and delivered intents (SmsReceiver.classandMessageStatusReceiver.classrespectively). Not that it is any consolation but you can find the following comment in the Sms application’s source:The best alternative seems to be polling
content://sms/sent, potentially using aContentObserver.