Reputation: 5258
I want to launch the root activity once app is maximized using home key(Previously it is minimized using home key).
I've tried to set android:clearTaskOnLaunch="true"
on my root activity(Splash) but its not working..
Also tried android:finishOnTaskLaunch="true"
on all other activity but it
doesn't work either.
Example
Total i have 5 Activities in the Sequence A,B,C,D,E. I am in D Activity, when i press home key app would be minimized when i again (long press home key) it would open my app but it should begin with Activity A instead of D.
Any help/ideas/suggestion would be appreciated.
Upvotes: 0
Views: 1073
Reputation: 18151
Unfortunately, it seems the excludeFromRecents
is only true for the root activity. So if you set the android:excludeFromRecents="true"
in your root activity, then your app will not show in the Recents (long press Home key). You can set android:clearTaskOnLaunch="true"
in your root activity then every time your app is relaunch, it will start from the root activity.
Upvotes: 1