Is a custom Android launcher supposed to signal somehow that it is ready?

I don't get BOOT_COMPLETED with my launcher, but when I use the system's original launcher BOOT_COMPLETED gets sent. Am I supposed to do something special in the launcher code to signal that it is ready?

Why is BOOT_COMPLETED not sent when I do my own launcher compared to the system's own launcher? My launcher works well, except BOOT_COMPLETED is never broadcasted when I use it.

UPDATE
It seems the launcher Activity has to be visible (and touchable?) at least until BOOT_COMPLETED has been sent, otherwise BOOT_COMPLETED doesn't seem to be sent at all. Can anyone confirm this?

I use black Activity with this and it doesn't work:

    getWindow().addFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
            | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
            | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE);

UPDATE I get this in logs, to show you that BOOT_COMPLETED really isn't sent:

01-04 17:33:39.384 541-599/system_process W/AudioService: onLoadSoundEffects() called before boot complete

After 20 minutes it's still the case. I am on KitKat 4.4.4.

UPDATE

Launcher manifest:

<activity android:name=".application.HomeInterceptorActivity"
          android:label="@string/app_name"
          android:launchMode="singleTop"
          android:clearTaskOnLaunch="true"
          android:stateNotNeeded="true"
          android:theme="@style/Invisible"
          android:excludeFromRecents="true"
          android:exported="false"
          android:noHistory="true">
          <!--android:taskAffinity="">-->
    <intent-filter>
        <action android:name="android.intent.action.MAIN"/>
        <category android:name="android.intent.category.HOME"/>
        <category android:name="android.intent.category.DEFAULT"/>
        <!--<category android:name="android.intent.category.LAUNCHER"/>-->
    </intent-filter>
</activity>

UPDATE It seems that the problem occurs if another Activity is started directly in the launcher's onResume() before BOOT_COMPLETED has been sent (Though it might equally well be a coincidence caused by some race-condition). It feels like the launcher has to spend some time in its own activity to allow BOOT_COMPLETED to be sent.

0

There are 0 answers