Questions tagged [launchmode]
176 questions
1
vote
0 answers
Detail Explanation of LaunchMode in Android
I want to learn the concept and idea for using launchMode in Android. When to use which mode and a little detail about each of them.
Because I am facing an issue in Animation Transition between Activity. As i go from Activity A to B. Amimation…

Zar E Ahmer
- 33,936
- 20
- 234
- 300
1
vote
1 answer
launchmode of Android Activity
Suppose I have a task in which I have A, B & C Activities respectively. And then I'm starting a new Activity D which has singleInstance as it's launchMode.
Now, I wonder what happens in the task level? Will the same task be preserved but contains…

stdout
- 2,471
- 2
- 31
- 40
1
vote
2 answers
Activity with singleInstance launchMode and a new Thread
I'm a bit confused really. When it says that
Activities with singleInstance launchmode uses the singleton pattern, and that instance will be the root activity of a new task
When it says new task, does it mean that the launching activity will get…

Tiko
- 990
- 7
- 18
1
vote
2 answers
android activity order, want only one instance of current activity, instead of clearing stack
singleTask and singleInstance alone are not the answer.
I have activities in a stack ... n, n+1, n+2
elements in n+2 can open n+1
this creates stack
... n, n+1, n+2, n+1
I want it to create stack
... n, n+2, n+1 , where n+1 is moved to the top of…

CQM
- 42,592
- 75
- 224
- 366
1
vote
1 answer
Android: SingleTop behavior with multiple intent filters
I am struggling with the following strange behavior of SingleTop activities.
I have defined some intent filters in that activity:

Denis Loh
- 2,194
- 2
- 24
- 38
1
vote
2 answers
Issue with launchMode Activity
I am implementing a custom launcher. I have two activity : Activity A with launchMode : singleInstance or singleTask, and Activity B.
Activity A is main screen. There are 2 case :
If i set Activity A launchMode : singleTask, I call Activity B from…

user1573559
- 13
- 6
1
vote
3 answers
Android - Back Press on the activity started from the notification bar
[UPDATE BELOW]
I have application with multiple activities. I have issues in handling the activity started from the click of notification item.
Below is the app structure:
For normal flow/working, user start the application and Activity A being…

user3156301
- 45
- 1
- 9
1
vote
1 answer
Activity LauchMode within a Login Behaviour
I'm trying to understand the android:lauchMode in order to apply it properly to an App I'm working on. Basically I have 2 activities. LoginActivity and HomeActivity.
The session state is stored, so if the app is killed and you were logged in, next…

Christopher Francisco
- 15,672
- 28
- 94
- 206
1
vote
0 answers
If my launcher activity is singleInstance how can I make application resume from the notification bar?
I have a launcher activity which I need to set launchMode to singleInstance. If I do this, resuming from notification bar doesn't work anymore, it starts my launcher activity every time. How can I make them work together?

Lupu Flaviu
- 21
- 2
1
vote
1 answer
how to avoid click on android shortcut create new app instance and kill the old one
I have create a android shortcut via the following code
Intent shortcut = new Intent("com.android.launcher.action.INSTALL_SHORTCUT"); shortcut.putExtra(Intent.EXTRA_SHORTCUT_NAME,getString(R.string.app_name));
Intent…

Minami
- 963
- 6
- 21
1
vote
0 answers
Mosync application crashes when is launched via notifications. LaunchMode singleTask
I'm using Mosync SDK 3.2.1 to develop a HTML 5 application for Android 2.2, 2.3 and 4.03. I had the issue described in this post http://jira.mosync.com/browse/MOSYNC-2367 . The fix proposed
android:launchMode="singleTask"
solved the "restarting of…

Batista Mihai
- 11
- 1
1
vote
2 answers
Android Start Activity from a service without starting the other activities of the app
I am starting an activity with Theme.Dialog on IncomingCall detected; however, when I start my dialog activity, it hides the Incoming Call Screen which is not the behavior I want. I want to start that dialog activity alone so that it appears on top…

Abdellah Benhammou
- 402
- 1
- 8
- 22
1
vote
1 answer
Android: Bind applications (AIDL) in singleTop/ singleTask Mode
I've binded 2 android applications with an AIDL file. The Exchange between the A and B applications is like below:
The A application connects to the B application through AIDL
interface
A application calls a method of the B service
B service…

johann
- 1,115
- 8
- 34
- 60
1
vote
2 answers
LaunchMode & Recent App Principle
I have a WidgetResultActivity and a NotificationResultActivity, I set both their launchmode=singleInstance. But they have different behaviors: WidgetResultActivity will not opened from RECENT, while NotificationResultActivity will always be opened…

thecr0w
- 2,148
- 4
- 33
- 59
1
vote
3 answers
Android starting existing app instance from Widget
I have an app that contains several activities...so lets say user is navigating activity stack A->B->C. Then presses the HOME button. Now when the user clicks on the Widget, I just want bring my app's existing/current instance to the foreground. I…

lumpawire
- 468
- 1
- 7
- 16