BOOT_COMPLETED导出后不叫上蜂窝 [英] BOOT_COMPLETED not called on Honeycomb after export

查看:155
本文介绍了BOOT_COMPLETED导出后不叫上蜂窝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个很奇怪的问题,并没有已经在网站上的问题有答案还是同样的问题。

I have a very weird problem, and none of the questions already on the website have an answer or the same problem.

我有一个应用程序接收BOOT_COMPLETED。                                          我确信它可以接收意图通过设置机器人:INSTALLLOCATION到internalOnly。 我有一个Log.Debug在我ONBOOT类,确认羯羊或不是被调用。

I have an app that receives BOOT_COMPLETED. I made sure it could receive the intent by setting android:installLocation to internalOnly. I have a Log.Debug in my OnBoot class, confirming wether or not it was called.

我有两个设备,一个Android 2.2和蜂窝。 在Android 2.2,它工作正常,但蜂窝...

I have two devices, an Android 2.2, and a Honeycomb. On android 2.2, it works fine, but Honeycomb...

  • 如果我安装在蜂窝平板电脑与Eclipse的运行按钮的应用程序,ONBOOT被称为当平板靴子。

  • If I install the application on the honeycomb tablet with eclipse's "run" button, onBoot is called when the tablet boots.

如果我安装在蜂窝平板电脑的应用程序导出*的.apk文件后,ONBOOT永远不会被调用。

If I install the application on the honeycomb tablet after exporting the *.apk file, onBoot is never called.

如果我安装在蜂窝平板电脑的应用程序导出*的.apk文件后,并重启,ONBOOT调用之前手动启动的一项活动。

If I install the application on the honeycomb tablet after exporting the *.apk file, AND manually start an activity before rebooting, onBoot is called.

这似乎是应用程序需要的活动,是要注册的接收开始至少一次......这感觉不对,因为一个应用程序可能有没有活动,而升级Froyo不会按照这种方式......

It seems like the application needs its activity to be started at least once for the receiver to be registered... It doesn't feel right, since an app might have no activity, and the Froyo doesn't work that way...

推荐答案

本作品为目的,假设你使用的Andr​​oid 3.1。和更高版本。

This works as intended, assuming you are using android 3.1. and later.

安装在3.1和更高版本的应用程序是在停止的安装后的状态。他们必须明确地由用户至少一次开始摆脱这一点。

Applications installed on 3.1 and later are in the stopped state after installation. They have to be explicitly started by the user at least once to get out of that.

在停止状态下的应用程序没有收到任何广播意图,包括 BOOT_COMPLETED

Applications in stopped state don't receive any broadcast intents, including BOOT_COMPLETED.

查看的Andr​​oid 3.1。 - API概述 - 在停止的应用程序启动控制

这篇关于BOOT_COMPLETED导出后不叫上蜂窝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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