Questions tagged [android-task]

Android task is a collection of activities that users interact with when performing a certain job. The activities are arranged in a stack (the back stack), in the order in which each activity is opened.

Android task is a collection of activities that users interact with when performing a certain job. The activities are arranged in a stack (the back stack), in the order in which each activity is opened.

A task is a cohesive unit that can move to the "background" when users begin a new task or go to the Home screen, via the Home button. While in the background, all the activities in the task are stopped, but the back stack for the task remains intact - the task has simply lost focus while another task takes place. A task can then return to the "foreground" so users can pick up where they left off.

Useful links

124 questions
0
votes
0 answers

How to re-open top activity when root activity is in singleTask mode

There are activities A and B. Activity A is app's entry point. I don't want to have multiple tasks with my app in the system, so I launch activity A in singleTask mode. A starts B (B is started in standard mode). When user presses Home button from…
0
votes
5 answers

Go back to MainActivity from any activities with Flag

I want to go back to MainActivity from any activities. For ex, my stack of activities: A - B - C - D. A (MainActivity) is in the bottom and D is in the top of stack . When I use android:launchMode="singleTask" . I can go back to A at any actvities…
RoShan Shan
  • 2,924
  • 1
  • 18
  • 38
0
votes
1 answer

GcmTaskService: What's an "in-flight task" documentation mentions?

The documentation for GcmNetworkManager::cancelTask https://developers.google.com/android/reference/com/google/android/gms/gcm/GcmNetworkManager" says Cancel a task, specified by tag. Note that a cancel will have no effect on an in-flight…
Don Box
  • 3,166
  • 3
  • 26
  • 55
0
votes
3 answers

Android back stack

I have an application with several Activities in Android A,B,C,D. I have a question about the back stack. A->B->C->D it is a normal sequence. My question is : when i press the back button in Activity D, i have to go to the Activity B, not back to…
0
votes
0 answers

Incorrect return behaviour of android app

I have my android app with some strange bug: in some scenarios when it's finished "returning" behaviour is incorrect. To be more clear: I open any android application, Calculator for example. I press home button and start my application from…
Ov3r1oad
  • 1,057
  • 1
  • 12
  • 25
0
votes
1 answer

Can I rely on a Background Android Process to get killed within a reasonable amount of time

we have an App which keeps some configuration data in memory. The configuration data is fetched from the server on start of the application. However, we would like this configuration to be updated from time to time (so new configuration data from…
Benjamin Mesing
  • 4,075
  • 1
  • 18
  • 22
0
votes
1 answer

How can I clear all but the top two activities in Android?

My App's activity structure can be any of the following. Case1: A > B > B > B > D Case2: A > B > D Case3: A > B > B > B > C > D There is an option in Activity D that when selected I would like to end up with this on the stack: A > B Where…
0
votes
1 answer

Android Background Service stop in lollipop whille swipe from task Manager

I Have a service in android app and I want to run in the background continuously even app is killed from task Manager.My current code works good for pre-lollipop versions.But in lollipop it is not worked(In lollipop it stops from task manager).How…
0
votes
1 answer

Android : Need help arranging the Tasks and Back Stack

I'm sorry if this sounds stupid and trivial but I'm stuck on it for a long time. I have 5 Activities A,B,C,D,E. And the chain goes like this A->B(finished after moving to C)->C->D->E. Since C,D are interdependent so I don't want to loose any…
0
votes
0 answers

Activity moves to different task

I have a photo editing app that is registered to a share intent (ACTION_SEND). I am struggling with a strange behaviour it has in the following scenario: I launch my app from the home screen and open a photo to edit I press the home button and…
Gili Garibi
  • 416
  • 2
  • 13
0
votes
1 answer

How to properly chain activities with new tasks?

I am making alarm application. I have 3 Activities: Main, Alarm,Game. They are declared in manifest:
Yarh
  • 4,459
  • 5
  • 45
  • 95
0
votes
1 answer

Android - need for task affinity, single task launch mode & task reparenting

I am trying to understand the need for task affinity in Android. I searched other SO answers as well. I am particularly interested in the combination of a singleTask launch mode and task affinity. For singleTask launch mode (OR Intent with NEW_TASK…
Jake
  • 16,329
  • 50
  • 126
  • 202
0
votes
0 answers

Are non-sticky services restarted when a task is restored?

If a task is destroyed in the background and the activity stack is later restored, are services originally started by that task also restored? More specifically, will they be restarted in this situation even if their onStartCommand(...) returned…
Kevin Krumwiede
  • 9,868
  • 4
  • 34
  • 82
0
votes
3 answers

Android - unable to retrieve Intent when Activity is set to Single Top

I'm developing an app with the following scenario: Activity A -> Activity B -> Activity C -> Activity A I pass my values between each Activity through the Intents, and it works, but when I come back to Activity A, it seems all values are…
0
votes
3 answers

How to manipulate current task's Activity back stack?

Currently I have 3 Activity classes A, B and C. Activity A is a singleTask while other has the default launch mode. Consider a case: the user is first in A, then starts B, and then starts C. The back stack now is ABC. Next, the user starts A…
Morty Choi
  • 373
  • 2
  • 10
1 2 3
8 9