What is the Android sent sms intent?

前端 未结 2 936
抹茶落季
抹茶落季 2020-12-04 00:27

Hey! I\'d like to know which is the intent android sends when it sends a message. And how can I listen for this intent in my application. I wanted that, when I send a messag

相关标签:
2条回答
  • 2020-12-04 00:38

    I believe the Intent is:

    public static final String SMS_RECEIVED_ACTION = "android.provider.Telephony.SMS_SENT";
    

    This guy had an article about how to build a BroadcastReceiver to do this.

    http://mobiforge.com/developing/story/sms-messaging-android

    However, I did a quick search through the Android documentation and couldn't find an android.provider.Telephony class. It may no longer be supported in the latest version of Android. However, its worth trying out. If you could respond back with a comment to let me know if this intent still works or not that'd be awesome. Not sure why it's not on the documentation site.

    Here's a similar question about listening for sms received events:

    android.provider.Telephony.SMS_RECEIVED not available

    0 讨论(0)
  • 2020-12-04 00:45

    I'd like to know which is the intent android sends when it sends a message.

    AFAIK, there is no Intent that is broadcast when Android sends an SMS. This is probably for privacy reasons as much as anything else.

    0 讨论(0)
提交回复
热议问题