I am looking for concrete examples of when to use
launchMode="singleInstance". Everywhere I read, it is said that there are very few occasions when it should be used. So I'm amazed I never see examples!!
The closest explanation I've found is here where it says:
[it] should only be used in the applications that are implemented entirely as one activity
But if that is the case, I wonder why it is never phrased so concisely in official Android documentation.
So my question is:
singleInstanceshould be used?
singleInstanceis a good idea
singleInstanceinappropriately, such as this question
According this article:
Only one AlarmAlert activity at a time and it is always its own task. Anything it might launch (if anything) becomes a part of a separate task stack.
But this information is deprecated. I found that Marshmallow is using
com.android.deskclock.timer.TimerAlertFullScreen as an activity with singleInstance launch mode.
<activity android:name="com.android.deskclock.timer.TimerAlertFullScreen" android:excludeFromRecents="true" android:theme="@style/TimerAlertFullScreenTheme" android:launchMode="singleInstance" android:showOnLockScreen="true" android:taskAffinity="" android:configChanges="screenSize|keyboardHidden|keyboard|navigation"/>
Here is the link.