开发者

How to perform an action when a text message is received?

开发者 https://www.devze.com 2023-01-08 08:05 出处:网络
I\'m working on an Android app that will send an automated response every time a text message is received.I looked around a bit on andr开发者_如何学Pythonoid\'s development site but haven\'t had anyth

I'm working on an Android app that will send an automated response every time a text message is received. I looked around a bit on andr开发者_如何学Pythonoid's development site but haven't had anything that points me in the right direction. Does anyone have any ideas on where I should start with this or have any good links that might help?

I am a total beginner with developing Android apps so please bear with me if I'm a little slow with this.


You need to create a BroadcastReceiver to receive the SMS Intent as well as update your manifest to ask for the permission to recieve and register for SMS broadcasts.

There are plenty of simple examples available online. Here are the first three I found.

  • http://mobiforge.com/developing/story/sms-messaging-android
  • http://davanum.wordpress.com/2007/12/15/android-listen-for-incoming-sms-messages/
  • http://www.androidcompetencycenter.com/2008/12/android-api-sms-handling/
0

精彩评论

暂无评论...
验证码 换一张
取 消