什么是Android发送短信意图是什么? [英] What is the Android sent sms intent?

查看:248
本文介绍了什么是Android发送短信意图是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿!我想知道这是故意的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:

<一个href="http://stackoverflow.com/questions/3760212/android-provider-telephony-sms-received-not-available">android.provider.Telephony.SMS_RECEIVED不可用!

这篇关于什么是Android发送短信意图是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆