android 3.1以上boot complete receiver接受的问题
2013-03-08 10:12
337 查看
可以参考如下的解释:
Broadcast Regression Confirmed In a previous
post, I cited evidence that the BOOT_COMPLETED broadcast will not work out of the box on Android 3.1 until the user uses your app. It’s actually somewhat bigger than that. In the issue that I filed seeking clarification, Ms. Hackborn indicated: Starting with
3.1 when applications are installed they are in a “stopped” state so they will not be able to run until the user explicitly launches them. Pressing Force Stop will return them to this state. As a result, when applications are first installed, they are totally
ignored by the system until and unless the user manually launches something: clicking on a launcher activity or adding an app widget, most likely. Developers who had been relying upon getting some sort of system broadcast without user intervention will need
to adjust their apps for Android 3.1. As I wrote in the previous post: I expect that most apps will be OK. For example, if your boot receiver is there to establish an AlarmManager schedule, you also needed to establish that schedule when the app is first run,
so the user does not have to reboot their phone just to set up your alarms. That pattern doesnot change – it’s just that if the user happens to reboot the phone, it will not set up your alarms, until the user runs one of your activities. UPDATE: To clarify
the above quote, once the user runs the app for the first time (and does not Force Stop it), everything behaves as before — a reboot will cause BOOT_COMPLETED broadcasts to be received and so on. However, if the user installs the app, until and unless they
run the app manually, no broadcasts will be received. And if the user force-stops the app, until and unless they run the app manually, no broadcasts will be received. This change is not terribly shocking, as it ratchets up the security another notch by limiting
ways malware can run without user knowledge. While it does not offer perfect security — the malware can still install its own copy of an Angry Birds launcher icon and hope users screw up — it is an improvement.
原文详见:
http://stackoverflow.com/questions/9682846/start-service-at-boot-time-for-android-4-0
Broadcast Regression Confirmed In a previous
post, I cited evidence that the BOOT_COMPLETED broadcast will not work out of the box on Android 3.1 until the user uses your app. It’s actually somewhat bigger than that. In the issue that I filed seeking clarification, Ms. Hackborn indicated: Starting with
3.1 when applications are installed they are in a “stopped” state so they will not be able to run until the user explicitly launches them. Pressing Force Stop will return them to this state. As a result, when applications are first installed, they are totally
ignored by the system until and unless the user manually launches something: clicking on a launcher activity or adding an app widget, most likely. Developers who had been relying upon getting some sort of system broadcast without user intervention will need
to adjust their apps for Android 3.1. As I wrote in the previous post: I expect that most apps will be OK. For example, if your boot receiver is there to establish an AlarmManager schedule, you also needed to establish that schedule when the app is first run,
so the user does not have to reboot their phone just to set up your alarms. That pattern doesnot change – it’s just that if the user happens to reboot the phone, it will not set up your alarms, until the user runs one of your activities. UPDATE: To clarify
the above quote, once the user runs the app for the first time (and does not Force Stop it), everything behaves as before — a reboot will cause BOOT_COMPLETED broadcasts to be received and so on. However, if the user installs the app, until and unless they
run the app manually, no broadcasts will be received. And if the user force-stops the app, until and unless they run the app manually, no broadcasts will be received. This change is not terribly shocking, as it ratchets up the security another notch by limiting
ways malware can run without user knowledge. While it does not offer perfect security — the malware can still install its own copy of an Angry Birds launcher icon and hope users screw up — it is an improvement.
原文详见:
http://stackoverflow.com/questions/9682846/start-service-at-boot-time-for-android-4-0
相关文章推荐
- android broadcastreceiver 重复创建和无法接受消息问题
- Android3.1后Boot_COMPLETED广播不响应的问题
- Android3.1后Boot_COMPLETED广播不响应的问题
- Android3.1后Boot_COMPLETED广播不响应的问题
- Android3.1后Boot_COMPLETED广播不响应的问题
- Android - Broadcast receiver 作为内部类接受广播
- android之4.0开机自接受广播,启动服务的问题
- 解决Android 6.0以上的相机权限适配问题
- 解决Android 5.0以上Button自带阴影的问题
- AES加解密算法在Android中的应用及Android4.2以上版本调用问题
- Android 6.0 以上版本提示“检测到屏幕叠加层”的问题,规避方法
- 关于Android23 及以上模拟器处理应用闪退的一些问题(权限相关)
- ok6410中搭建linux/Android开发环境遇到reading u-boot.bin error found:0010、tftp传送文件遇到问题
- Cordova编译Android 22 以上版本,中文目录出错问题的解决办法
- Android初学习 - 在BroadcastReceiver中启动Activity的问题
- 关于Android Intent传值接受的问题
- 关于Android 6.0及以上版本用PendingIntent传送数据丢失问题
- Android Receiver not registered问题
- android 5.0以上so文件关于平台支持问题的浅析
- android4.4以上 webview加在图片的缩放问题