短信接收器作为服务 [英] SMS Receiver as a Service
问题描述
我创建的短信接收器的应用程序...但我想创建它作为一个服务,它应该在后台运行(也就是为这个应用程序没有单独的UI,希望像闹钟应用工作),这样即使手机重新启动它自动启动...可以在这个任何一个帮助吗?
我的previous短信接收器应用code在这里
<一href=\"http://stackoverflow.com/questions/10769107/unable-to-instantiate-activity-componentinfo-in-android-receive-sms-app\">Unable实例活动ComponentInfo Android中接收短信应用
它应该在后台运行
块引用>您现有的
广播接收器
的(无证)android.provider.Telephony.SMS_RECEIVED
已经在后台运行。
即使重新启动手机自动启动
块引用>您现有的
广播接收器
的(无证)android.provider.Telephony.SMS_RECEIVED
已经可用的设备后,重新启动。I have created SMS Receiver app... but i want to create it as an service, it should run in the background (i.e no separate UI for this app, want to work like alarm app) and even if mobile restarts it automatically starts... could any one help on this?
My previous SMS Receiver app code was here Unable to instantiate activity ComponentInfo in Android Receive Sms App
解决方案it should run in the background
Your existing
BroadcastReceiver
for the (undocumented)android.provider.Telephony.SMS_RECEIVED
already runs in the background.and even if mobile restarts it automatically starts
Your existing
BroadcastReceiver
for the (undocumented)android.provider.Telephony.SMS_RECEIVED
already is available after the device reboots.这篇关于短信接收器作为服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!