Re-launch of Activity on Home button, but…only the first time

后端 未结 3 649
甜味超标
甜味超标 2020-11-22 02:36

The application that I am developing has a weird behavior the first time that it is installed. If the user backs out of the application normally the first time, it will fore

3条回答
  •  滥情空心
    2020-11-22 02:37

    Why this is behaving, no clue. But I know that custom Launcher have specific launchModes set.

    For example the ADW.Launcher:

    android:clearTaskOnLaunch="true"
    android:launchMode="singleTask" 
    

    Home application in the Android SDK samples: android-sdk\samples\android-16\Home\AndroidManifest.xml

    android:launchMode="singleInstance"
    

    To quote CommonsWare: How to prevent custom home launcher app restart activity?

    I am going by the Home sample application from the SDK, which uses singleInstance. Curiously, the AOSP launchers use singleTask

提交回复
热议问题