Questions tagged [launchmode]

176 questions
1
vote
1 answer

Activity in launchMode singleTask gets destroyed when started via TaskStackBuilder

I have an activity A, declared in Manifest with android:launchMode="singleTask" and another activity B that has no further attributes. As far as I know, if there is already some task running activity A, instead of creating a new instance, the…
JacksOnF1re
  • 3,336
  • 24
  • 55
1
vote
4 answers

Android - Preventing duplicate window on Intent & StartActivity

I am trying to solve an issue with my android application. The issue is that when i start a new instance or class by calling an Intent and StartActivity, a duplicate window or view opens. I want to keep the same activity or view but execute/run a…
AlpaxJ1
  • 125
  • 3
  • 12
1
vote
1 answer

Email intent closes application

I am facing a weird behavior in my app. I have an email chooser so the user can pick the mail client he wants to send an email. In debug mode when I picked an email client (e.g. gmail), and press back everything works fine and I am navigated to the…
antonis_st
  • 468
  • 3
  • 16
1
vote
1 answer

How Can I directly open onResume() without any other callbacks of an activity when the activity is coming back from onStop()

How can I directly call onResume() without any other callbacks of an activity when the activity is coming back from onStop(). Suppose I have 3 activities. The activity flow goes this way, A -> B -> C -> A. When I click on Activity C, Activity A…
Monu
  • 9
  • 1
1
vote
1 answer

Activities' stack (after exit the app, the system clears stack if launchMode="singleInstance")

I don't understant why is this happend: I need to create every Activity in single instance, so I put android:launchMode="singleInstance" in Manifest. But when I push 'Home' on the device and open it again the system clears the stack and opens the…
alla
  • 529
  • 5
  • 20
1
vote
1 answer

Why is onNewIntent() not used together with singleInstance launchmode?

Why is onNewIntent() not used together with singleInstance launchmode? I mean if I re-launch my singleInstance Activity I might still want to get that new Intent, right?
JohnyTex
  • 3,323
  • 5
  • 29
  • 52
1
vote
1 answer

"sf_frame_dur" in log means?

Can anybody tell me actual meaning of following logs: 06-02 13:53:50.365 1405 1405 I sf_frame_dur: [com.android.dialer/com.android.dialer.DialtactsActivity,0,0,1,1,2,1,0] TIA.
Rahul
  • 739
  • 4
  • 15
  • 31
1
vote
1 answer

How to prevent recreation of a singleTask activity on back button press?

I have a simple launcher app, that doesn't launch any apps, just shows a WebView. It is set as the default launcher. I don't use any other apps on this tablet. When I restart the tablet, this launcher starts as expected. My problem is if I press the…
Tamás Bolvári
  • 2,976
  • 6
  • 34
  • 57
1
vote
1 answer

Activity flow: clicking on my app icon will onCreate MainActivity

In my app, I navigate from MainActivity to Activity B. I then press the HOME button and then click on the app icon again to maximize it. Instead of onResuming my Activity B, it goes back to MainActivity. This makes sense because in my…
Simon
  • 19,658
  • 27
  • 149
  • 217
1
vote
0 answers

Close Android application containing Single Instance Activities

I have developed an android application. According to requirement, data should only be fetched once from server in all activities and activity state should be save, so when user out of that screen and landed to that activity again it will see same…
rizwan
  • 71
  • 6
1
vote
0 answers

Android launch mode issue

Although I have been searching on Stack Overflow for quite some time, did not find the answer I want so far. 1. Problem description: I have an Android app with bunch of activities and submitted to Google Play. After it's published, I downloaded…
SamChan
  • 95
  • 1
  • 5
1
vote
1 answer

My app is creating new intent, I want my old intance of app (if running) when I start app

I am working on an app. Its' a single page stopwatch app. So when I press home button and start it again or run from running apps it creates new instance of app. I want previous current running instance. I googled this and found that I need to set…
Surjit Singh
  • 269
  • 3
  • 8
1
vote
2 answers

Android app with 2 launcher icons with separate taskAffinity

I have app with 2 launcher icons and 2 different Activities. Manifest file is as like below: ....
Jemshit
  • 9,501
  • 5
  • 69
  • 106
1
vote
1 answer

onCreate() of Launcher activity gets called when app launched on clicking launcher icon

I have found very strange bug with the Android application, while installing the application in Android Device with given flow. Installed the app from playstore(old version). Launched the application(Now I'm in the HomeScreen,.i.e.,…
1
vote
0 answers

Overide HOME button to mimic BACK button or launch Activity faster

I want to override the HOME button to behave exactly like the BACK button in Android. I have looked at similar questions on this site, but they don't work. I am currently building a lockscreen and have managed to open an activity above the security…
Rex
  • 143
  • 1
  • 3
  • 11