Questions tagged [launchmode]
176 questions
0
votes
1 answer
Issue regarding Launch Modes in Android
I have gone through below documentation link :
https://android.jlelse.eu/android-activity-launch-mode-e0df1aa72242
Here, I understood the working of all the four Launch Modes namely :
Standard, SingleTop, SingleTask, SingleInstance.
Also got…

Jaimin Modi
- 1,530
- 4
- 20
- 72
0
votes
0 answers
Instance of same activity creating every time app come in foreground from background without destroying previous one
I m facing this issue of creating multiple instance of same activity when app comes in foreground from background. Every time app goes in background then comes in foreground after sometime, new activity created without destroying old so the count…

lokesh kumar
- 1
- 1
0
votes
2 answers
How to make sure the MainActivity will be created only once
I have a react native project. And there is a service running in the background.
When the app is not running, the service is still alive, and it may want to start the MainActivity in some time. I’m using the following code to start MainActivity(I…

xi.lin
- 3,326
- 2
- 31
- 57
0
votes
0 answers
Recreated activity returns home on back press, starting API 28
I observe an unwanted behavior starting Android Emulator API level 28 when I recreate an activity. On back press I'm getting on the home screen instead of the previous activity like below on API level 27 and below.
So the situation is as…

Bruno Bieri
- 9,724
- 11
- 63
- 92
0
votes
1 answer
Shared element transition is not working, if app open through deep link
Im added shared element transition to launch Activity B from activity A.
Normally shared element transition is working, but its not working, if app launch through deep link and showing Activity A view.
Activity B launch mode : SingleTask

user8632458
- 45
- 1
- 8
0
votes
2 answers
How to start an activity from a singleInstance activity?
I have a widget which can pop up small dialogs when clicked. These dialogs are displayed by an activity called RemoteActivity in singleInstance launchMode. In one of these dialogs, there is a button to launch the main app MainActivity, which has the…

olivierg
- 10,200
- 4
- 30
- 33
0
votes
2 answers
Confuse about launchMode
I have Activity A which calls B, at which point let's say the user presses the home button:
1) If the user long presses the home button and brings out the recently launch application, it will bring the user back to activity B.
2) If the user opens…

SteD
- 13,909
- 12
- 65
- 76
0
votes
0 answers
Result is not received in Activity which was started with Intent flag Intent.FLAG_ACTIVITY_REORDER_TO_FRONT
I have 3 Activities. StartupActivity, LoginActivity and PinActivity.
StartupActivity starts PinActivity with startActivity and flag Intent.FLAG_ACTIVITY_REORDER_TO_FRONT
In StartupActivity I have a REST API call which gets successful and…

Mohammed Rampurawala
- 3,033
- 2
- 22
- 32
0
votes
2 answers
singleTask launch mode is not working
Having this weird problem of multiple instances of my activity getting created even after specifying the launchMode as singleTask. Has anybody faced this issue ? Any pointers will be appreciated.
Below is how i have declared my activity in the…

Varun Sharma
- 11
- 4
0
votes
1 answer
Activity reopens itself by the number of times it is opened while back button is clicked
Lets assume a scenario such below and in this scenario every letter points an activity, every number within parenthesis points opening time and every arrow points a transition from one to another
A(1) -> B(1) -> A(2) (meaning A is opened then B is…

Mustafa Güven
- 15,526
- 11
- 63
- 83
0
votes
3 answers
Back Stack And Intent Flag Not working
IN my app launcher is activity A, then user go to Activity B then Activity C then Activity D. From D if user perform some action then user should redirect to activity E.
Like A->B->C->D->E
Now if user press back button from activity E then he…

Ravi Bhandari
- 1
- 1
- 4
0
votes
0 answers
Do not close an activity at the top pf stack on pressing home button
I have a launcher ActivityA (launch mode - singleTask), that opens ActivityB on pressing a button. Now, I press the home button and open the application again. I see ActivityA but not ActivityB. I want the activity which is displayed before pressing…

shilpa sarawagi
- 11
- 1
0
votes
1 answer
Android singleTop Activity issue
I declared my activity as singleTop in the manifest file.
I am passing some value with intent when I launching this activity.
Intent i= new Intent(A.this,MysingleTopActivity.class);
i.putExtra("isActive",true);
startActivity(i);
same steps I am…

Parth
- 1,908
- 1
- 19
- 37
0
votes
0 answers
Android Activity singleTask behavior issue
I am running into an issue where my CloudRail-using Activity requires Google's OAuth authorization, so it must do it through the Chrome browser and get back the authorization via a custom scheme.
In order to get it handled in the same (calling)…

KT_
- 978
- 11
- 26
0
votes
1 answer
Launch App1 from App2,then press home button to the home screen,and open App1 again by press icon,why onCreate get called?
I launched App1 from App2, and here are the methods in App2:
Intent resolveIntent = getPackageManager()
.getLaunchIntentForPackage("com.example.weijunhao.launchmode");
startActivity(resolveIntent);
Then I press the home button to go to the home…

junhao
- 1