Questions tagged [launchmode]
176 questions
4
votes
2 answers
Acitivity SingleTask behaviour with SplashScreen
In my App I have:
-SplashScreen (SSc) preparing the application (starting services and so on)
-MainActivity (MA) the most relevant part of the app handling most actions
-and some other activities which are not that relevant
For my App I'd like to…

Denny1989
- 639
- 1
- 9
- 15
4
votes
2 answers
Understanding android:launchMode
I'm getting really confused about the different activity launchModes in Android. I understand it has something to do with the activity stack which is also something not so clear to me. I would appreciate a short explanation about each launchMode…

smichak
- 4,716
- 3
- 35
- 47
3
votes
0 answers
TWA autocloses on firing chrome intent
What I want is to CustomTWAActivity to not close and keep on running.
I have a MainActivity that starts a TWA (Trusted Web Activity based on CCT protocol). I have extended the TWA Launcher with a Custom Class so that I can override its onNewIntent…

Dhruvam Sharma
- 1,661
- 14
- 22
3
votes
2 answers
SingleTask activity is created multiple times within the same process
I have a launcher app which has a singleTask activity as the main entry point. When the user navigates away to another activity or to a 3rd party app and then hits the home button, then this activity should be brought to the front. However what I…

keybee
- 1,498
- 20
- 32
3
votes
2 answers
task affinity for singleInstance activity?
I want to know what is the default task affinity for singleInstance activity?
Since each singleInstance Activity opens up as root activity in a new task.
and there is no need to declare android:taskAffinity.
See I have read the developer guides and…

Yogesh Seralia
- 340
- 5
- 23
3
votes
3 answers
Activity is creating again when i want to bring existing one to front
I've added REORDER_TO_FRONT flag to bring my existing activity to top instead of creating a new instance. But it calls onCreate method of the activity instead of onNewIntent in MainActivity. If i add launchMode="singleTop" in Menifest, then works…

Usman Rana
- 2,067
- 1
- 21
- 32
3
votes
1 answer
App restarting on play store open click

user3278732
- 1,694
- 10
- 31
- 67
3
votes
1 answer
Multiple activities with singleTask
I'm getting extremely confused with activity launch modes. Here is the scenario.
Activity A - main, launcher with singleTask launch mode
Activity B - singleTask launch mode
Activity C - standard launch mode
Now here is what I'm doing
Activity A…

Parthib
- 31
- 4
3
votes
1 answer
How do I keep single instances of my Activities working with the backstack?
I have an app with a MainActivity and ChildAaActivity and ChildBbActivity.
MainActivity can send us to either of the Child activities and the user can move between the two Child activities as often as they want.
However, there must only be one…

Nick Cardoso
- 20,807
- 14
- 73
- 124
3
votes
3 answers
How to get android:launchMode attribute in program code
I need to dismiss my dialog if the android:launchMode is not standard, I need to access this attribute in my code, it is set in the manifest file, I cannot find the solution, anyone can help? Thank you!

newszer
- 440
- 1
- 4
- 23
3
votes
1 answer
Keep task stack when opening singleInstance activity from recent apps screen
My application contains multiple activities, the main activity (A) is in launchMode singleTop, every over activities are in singleInstance mode.
I've choose singleInstance for preventing illimited navigation
if i navigate like this : A -> B -> C ->…

Lezme
- 266
- 1
- 3
- 12
3
votes
2 answers
singleTask mode & task back stack
Could please someone give me an example of how we can create a task back stack with having an Activity, which has launchMode=singleTask, at top of the stack and it's not the only activity in the back stack.
For example, we have one such task in the…

stdout
- 2,471
- 2
- 31
- 40
3
votes
2 answers
Up Navigation and singleTop launch mode
I have an activity A, and when I press an toolbar item, it starts activity B using startActivity(intent). Whenever I press back button or the up navigation icon, it closes my app. I believe it's because I'm using launchMode="singleTop" in my parent…

Fernando Santos
- 392
- 4
- 19
3
votes
0 answers
Android: Recents tasks list, android:excludeFromRecents="true" behaviour with android:launchMode="singleTop"
Basically i do not want to show my app activity task in recents app..Have only one activity in my app.
Here is my Activity details:

NitZRobotKoder
- 1,046
- 8
- 44
- 74
3
votes
0 answers
Android Backstack Examples?
Can any body tell me, what is the real life example of Intent Flags or launch mode. Please give me only real life use of these flags not an example like Activity A call Activity B using standard intent. Give real Life example like:
In an eCommerce…

Akashsingla19
- 690
- 2
- 8
- 18