Android 发送短信意图是什么?
嘿!我想知道android发送消息时发送的意图是什么。我如何在我的应用程序中倾听这个意图。我希望,当我在本机 Android 消息传递中发送消息时,我的应用程序会监听此意图,因此它会知道已发送新消息。
那么,它是哪一个,以及如何倾听这一意图?
谢谢。
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 message in native android messaging, my application listen this intent, so it will know a new message has been sent.
So, which one is it, and how to listen for this intent?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我相信意图是:
这个人有一篇关于如何构建 BroadcastReceiver 来做到这一点的文章。
http://mobiforge.com/developing/story/sms-messaging-android
但是,我快速搜索了 Android 文档,但找不到 android.provider.Telephony 类。最新版本的 Android 可能不再支持它。然而,它值得尝试。如果您可以回复评论,让我知道这个意图是否仍然有效,那就太棒了。不知道为什么它不在文档网站上。
这是关于监听短信接收事件的类似问题:
android.provider.Telephony.SMS_RECEIVED不可用
I believe the Intent is:
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
AFAIK,当 Android发送短信时,没有广播
Intent
。这可能是出于隐私原因以及其他原因。AFAIK, there is no
Intent
that is broadcast when Android sends an SMS. This is probably for privacy reasons as much as anything else.