短信接收器作为服务 [英] SMS Receiver as a Service

查看:138
本文介绍了短信接收器作为服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建的短信接收器的应用程序...但我想创建它作为一个服务,它应该在后台运行(也就是为这个应用程序没有单独的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屋!

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