Questions tagged [launchmode]
176 questions
3
votes
1 answer
Examples of when to use launchMode = "singleInstance"
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…

Jodes
- 14,118
- 26
- 97
- 156
3
votes
0 answers
Google play in app purchases with singleTask launchMode?
I have added in app purchases to a game and they work fine, until you press the home button while you're making an in-app purchase. The application needs to be in singleTask mode (it is a Unity project).
So, taking google's sample project from the…

oanaT
- 31
- 2
3
votes
2 answers
Getting java.lang.RuntimeException while starting an activity
I have an activity, A, which is SingleTop when I want to start this activity inside her, with another intent data, like this:
Intent intent = new Intent();
intent.setData(Uri.parse("something://someone"));
startActivity(intent);
this exception…

Kayhan Asghari
- 2,817
- 1
- 28
- 47
3
votes
3 answers
Why is Account Picker in Android application getting canceled?
Following the "Five minute quick start" documentation for uploading a file from an Android device to Google Drive, I've written a test application that successfully uploads a file but my attempt at copying the relevant code to a larger application…

gregS
- 2,580
- 5
- 28
- 33
2
votes
2 answers
How to check an Android APP's back stack in real time?
I'm playing with Android, and when I'm testing different Activities/Intent flags or launch mode, I can not get expected behavior(especially when different activity has different flags). And I have read Google Dev Guide very carefully, but still can…

posaidong
- 663
- 6
- 11
2
votes
1 answer
How to correctly launch Voice Recognition activity from an activity with singleInstance launch mode?
Already saw another thread which mentions that an activity with RecognizerIntent was not working correctly if launched from within an activity with singleInstance launch mode. So I would like to know what my alternatives are.
My use case is as…

user492501
- 31
- 3
2
votes
2 answers
Prevent multiple instances of Activity but still use onActivityResult
I have an activity that I want to exist only once, no matter how many times it is opened. Previously I was using launchMode singleTask, and everything was working great. However, now I need to be using onActivityResult, which for some reason is…

Leo
- 4,652
- 6
- 32
- 42
2
votes
0 answers
Activity launch mode singleInstance works unnormal in Android 11
Summary:
ActivityA start ActivityB (ActivityB is singleInstance) ,then click home,ActivityA lifeCycle goto onDestroy?????????????
Detail:
I define two activity:
ActivityA:
class ActivityA : AppCompatActivity() {
override fun…

zhang qinglian
- 1,633
- 2
- 11
- 8
2
votes
1 answer
How can I resume a running activity?
I made myself an app: a music player with automatic bookmarking :)
Problem:
If I go "back" to the home page and then try to run the app again, it creates a new instance whereas I want to continue. I might leave music running while I do other things…

karnok
- 1,202
- 1
- 12
- 17
2
votes
2 answers
Two Instances opened When opening application from dynamicaLink and from launcher icon?
I ran into an issue in my Android Application where whenever I open my app through a dynamic link shared on Whatsapp, it will open in the same Whatsapp Application. I can see by going to the recent task that there is only one Application in a recent…

Aman Verma
- 3,155
- 7
- 30
- 60
2
votes
0 answers
change activity launch mode to singleInstance makes me lose my custom animation
I change activity launch mode to singleInstance in AndroidManifest.xml
but it makes me…

Mostafa Daif
- 31
- 6
2
votes
0 answers
Clear task when launching from home screen
Whenever I re-launch application from home screen it starts launcher activity specified in manifest but when I press back button then application does navigate to activity which was previously minimized by pressing home button:
home -> A -> B ->…

Darek Deoniziak
- 763
- 8
- 17
2
votes
0 answers
Start activity into task despite android android:launchMode="singleInstance"
Hi, currently I'm developing an android-launcher application using Ionic 3/Cordova. To make sure there's always only one instance at a time I'm using android:launchMode="singleInstance" ( When setting the app as homescreen while the app is already…

Frede
- 701
- 4
- 14
2
votes
2 answers
Android Facebook Login Cannot call LoginFragment with a null calling package
I have added facebook login to my app.
First time I am able to login without any issue. But after login and then I logout. I am getting this error in the logcat.
E/LoginFragment: Cannot call LoginFragment with a null calling package. This can occur…

Rakesh Yadav
- 1,966
- 2
- 21
- 35
2
votes
2 answers
Do not destroy android activity and should not be in the history
I have a problem with Android and the transitions with activities.
What I want to have is the following:
MainActivity calls Activity B.
Activity B calls MainActivity (for example, via Back Button, same instance)
MainActivity calls the same instance…

user3215952
- 223
- 5
- 11