在Android 1.6中接收短信
我有一个代码示例(来自 Reto Meier 的书),用于使用广播接收器在 Android 应用程序中接收 SMS 消息。
我希望能够在我的应用程序中接收短信,但是我已经拥有的示例代码似乎比我所知的要贬值...
是否有人有更新的(android 1.5 或 1.6)示例如何在Android应用程序中接收短信?
谢谢。 汤姆.
I have a code sample (from Reto Meier's book) on receiving SMS messages in an android application using a broadcast receiver.
I am looking to be able to receive a SMS message in my application however the code I already have a sample of seems to be depreciated from what I can tell...
Does anyone have a more up to date (android 1.5 or 1.6) example of how to receive SMS messages in an android application?
Thanks.
Tom.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您能否向我们展示您拥有的产品或告诉我们您认为它可能存在哪些问题?
接收短信的一般步骤非常简单。基本上,您使用
android 的意图过滤器构建 BroadcastReceiver .provider.Telephony.SMS_RECEIVED
。有几个关于这个主题的教程。在 Google 上进行快速搜索后,发现了这个和这个。Could you show us what you have or tell us what you think might be wrong with it?
The general steps for receiving an SMS are pretty easy. Basically you build a BroadcastReceiver with the intent filter of
android.provider.Telephony.SMS_RECEIVED
. There are several tutorials on this topic out there. A quick Google search turned up this one and this one.