什么是Android发送短信意图是什么?发送短信、意图、Android

2023-09-12 08:07:41 作者:七友

嘿!我想知道这是故意的Andr​​oid时,它发送消息发送。我怎么可以侦听此意图在我的应用程序。我想,当我送的原生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?

感谢。

推荐答案

我相信原意是:

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

这家伙如何建立一个BroadcastReceiver这样做的文章。

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

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

不过,我也通过Android文件快速搜索,但没有找到一个android.provider.Telephony类。它可能不再是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不可用!

 
精彩推荐
图片推荐