开发者

How to run an activity in the background in android, and it should show up if a message is recieved?

I have a requirment in my task that there is a activity that recieves a text sms and performs some functionality, i want that activity to sleep in the background until an sms is recieved, and when that sms is re开发者_如何学Gocieved it should pop up and perform the functionality

  1. How can i make the application work and listen in the background in android?

  2. How can i activate it upon reception of the message? and how to test it on emulator?

Regards,

Wasif


Look at this post on howto emulate, receive and handle SMS messages

Android API – SMS handling


You will need to implement it as a Service.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜