BOOT_COMPLETED not called on Honeycomb after export

I have a very strange problem, and not one of the questions already on the website has an answer or the same problem.

I have an application that gets BOOT_COMPLETED. I made sure that he can get the intention by setting android: installLocation for internalOnly. I have Log.Debug in my OnBoot class confirming that it was called.

I have two devices: Android 2.2 and cellular. On Android 2.2, it works fine, but Honeycomb ...

  • If I install the application on a tablet using the start button "eclipse", onBoot is called when the tablet boots.

  • If I install the application on the tablet of my cell after exporting the * .apk file, onBoot is never called.

  • If I install the application on the tablet of the cell after exporting the * .apk file, and manually start the operation before rebooting, onBoot is called.

It seems that the application requires that its activity be launched at least once when the recipient is registered ... This is not so, because the application may not work, and Froyo does not work this way ...

+4
source share
1 answer

This works as intended if you are using Android 3.1. and later.

Applications installed on 3.1 and later are in a stopped state after installation. They must be explicitly launched by the user at least once in order to exit this.

Applications in a stopped state do not receive any broadcasts, including BOOT_COMPLETED .

See Android 3.1. - API Overview - Launching Controls for Stopped Applications

+9
source

Source: https://habr.com/ru/post/1401144/


All Articles