Questions tagged [launchmode]

176 questions
0
votes
0 answers

Android App lifecycle issues after going to Homescreen and reopening (only after first app start)

When downloading and installing my app from the Play Store, I have the following issue: After I start the app for the first time I get into my LoginActivity (which has intent-filters MAIN and LAUNCHER), I log in and then start my MainActivity, that…
0
votes
0 answers

Maintaining Single Variable[APP_MODE] for Different Activity stacks in a single application

I am working on an application where i have 3 launcher Splash Activities and as soon as its gets installed, its shows three launcher icons(for three activities). Now since each activity starts on a different Activity stack and the rest Code is…
0
votes
1 answer

Weird singleTask behaviour

I understand that launchMode:"singleTask" means that if an activity has previously been created and is requested in future to show up , Android will simply show the old one instead of creating a new instance. The problem i am facing can be…
Sarthak Mishra
  • 1,033
  • 1
  • 11
  • 27
0
votes
0 answers

get result from Activity using fragment called immediately

I have Fragment A in Activity A. When i start a new Activity B using startActivityForResult from Fragment A. onActivityResult called immediately while Activity B has just started.The result code got using onActivityResult correct in Fragment but…
Zar E Ahmer
  • 33,936
  • 20
  • 234
  • 300
0
votes
0 answers

Launching my app from a chooser causes my backgrounded activity to be re-created instead of onNewIntent called

I have an activity with an intent filter for ACTION_SEND. A file can be shared to this activity from another app , let's say Gallery, and handled in onNewIntent. However, on my Samsung Galaxy S5 it's not working as it used to (it's been tested on…
0
votes
1 answer

SingleInstance activity launched from notification, on backPressed, comes out of app

I have 3 activities in my app: A, B, C. A launches B, B launches C. C's launch mode is SingleInstance(declared in manifest). Steps: 1.When I am on C, I show notification in notification bar, onclick of which launch same screen. 2. I put my app in…
0
votes
2 answers

How can an activity with 'singleTask' launch mode be not root activity in a task?

This is an image from android documentation: Activity Y has 'singleTask' launch mode but it is not root activity in the task, that is Activity X. How did it happen? Upd.: From the documentation: "singleTask" The system creates a new task and…
TpoM6oH
  • 8,385
  • 3
  • 40
  • 72
0
votes
1 answer

Android Launch Mode Single Task

In my app i have a dashboard activity and it's launch mode is "SingleTask" Are there any chances that my app gets in onNewIntent without onCreate? For example if user navigates to another activity from Dashboard and after Dashboard is destroyed,…
savepopulation
  • 11,736
  • 4
  • 55
  • 80
0
votes
0 answers

How to start my app from browser as a separated task

My activity definition looks like this:
LiuWenbin_NO.
  • 1,216
  • 1
  • 16
  • 25
0
votes
1 answer

onActivityResult() called prematurely while calling Settings activity

I'm facing the known issue onActivityResult getting called immediately. I read the reason behind it on some link where it is advice to change launch mode of called activity. But in my case I'm starting(navigating to) settings activity, to let the…
0
votes
1 answer

Activity Launch Mode Single Instance Usage

I have two Activities. WebViewActivity and CameraPreviewActivity I should be able to switch between the two activities on click of a button. Once I have started CameraPreviewActivity, further loads of the activity should not take much time to…
arjoan
  • 1,849
  • 2
  • 20
  • 39
0
votes
2 answers

Could an activity with single task flag be cleared via clear top?

Assume that I have a launcher activity A which has singleTask launch mode. Now imagine that A starts Activity B like; Intent intent = new Intent(this, B.class); intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP |…
stdout
  • 2,471
  • 2
  • 31
  • 40
0
votes
2 answers

Android application closing when user press home button

I dont want to close my application when uses press home button. But on some devices, android system closes my application. This is scenario: SCENARIO X: (I WANT): Activity A->Activity B-> Activity C - PRESS HOME BUTTON- Launch application - User…
sipdorus
  • 963
  • 1
  • 12
  • 28
0
votes
1 answer

How start another package ontop of the stack?

I have to app stacks like this: A->B-C->D X->Y In Y I want to use getLaunchIntentForPackage("package") to get to D, however I get to A. What launch mode should I use etc? I would like to use singleTask for ABCD if possible. Also when in D and I…
0
votes
1 answer

How to erase the original intent from the "recent apps" slot too?

My app has launch-mode attribute ="singleTop" in the manifest and handles the intent it was launched by with getIntent(). After handling the intent it calls setIntent(new Intent()); to erase the original intent. This avoids the activity handle the…
1 2 3
11
12