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

Android app installs and runs from Eclipse but will not run when installed from .apk file on phone

I have an app I've been developing for Android. The application installs and runs fine from Eclipse but when I export the .apk, put it on the phone and install it then the app will not run and closes. I get this message in logcat: 05-01…
Paul Alexander
  • 2,686
  • 4
  • 33
  • 69
0
votes
1 answer

When using taskAffinity to have multiple Activities in the Launcher for the same app, if one is active the other needs to be clicked twice

Scenario: Two Activities being shown in launcher for one app, they have different taskAffinities because I was getting the problem of when I open one, hit home, open the other, the first one would be opened. So, I added taskAffinity in the…
0
votes
1 answer

Activity stack behavior when activity is started from widget

I have two avtivities. Let's call them ActivityA and ActivityB. ActivityA is marked singleTask in manifest file. I can start ActivityB from ActivityA using simple startActivity call (no Intent flags used). Also I can start ActivityC from ActivityA…
Lingviston
  • 5,479
  • 5
  • 35
  • 67
0
votes
1 answer

How to refresh the task in a retained TaskFragment

I have used a Fragment to perform the background update of the app avoiding interruption if the activity is destroyed or paused. Following this sample the update task start in if (mTaskFragment == null) { mTaskFragment = new TaskFragment(); …
AndreaF
  • 11,975
  • 27
  • 102
  • 168
0
votes
2 answers

Calling movetasktoback method on an Activity on top of home screen does not bring Home screen to foreground

I have an activity with launch mode as Single Task.The activity is launched by with intent flags Intent.FLAG_ACTIVITY_NEW_TASK by a Broadcast receiver . If this activity is on top of home screen and if I call moveTasktoBack(true) from this activity,…
0
votes
2 answers

How to get combined behaviour of FLAG_ACTIVITY_CLEAR_TOP and FLAG_ACTIVITY_CLEAR_TASK?

There are so many questions on SO related to this, but no such direct questions I could find. My app has a main activity M, and a sub activity S. M launchMode is singleTask because I only ever want one instance running and I want S to exist in the…
Mark
  • 7,446
  • 5
  • 55
  • 75
0
votes
1 answer

Getting Intent when App re-launch

Suppose there are only 2 Activities in an Application : 1. Activity A (Launcher Activity) 2. Activity B Code for Acrivity A in onCreate() : Intent intent = new Intent(); intent.putExtra("key", "test"); intent.setClass(this,…
Shanki Bansal
  • 1,681
  • 2
  • 22
  • 32
0
votes
0 answers

How to know if home screen currently running at the foreground

I am making a parental control app. The user can run other program from my app. When they hit the home button and goes to the home screen, I want my app to detect it so that it can be redirected to my app. How can I do this?
0
votes
1 answer

Restart TimerTask Failed

i'm writing simple code to start and stop TimerTask. in this code Stop can work but i can not restart TimerTask. please help me to resolve this problem. My code: public class MainActivity extends Activity implements View.OnClickListener { …
user4001049
0
votes
1 answer

Trying to Understand Android Tasks

I'm trying to understand android tasks. Suppose you start an activity X from its launch icon and from that activity you start a new activity Y from a different application. You have a task consisting of the activities X and Y. Now suppose you press…
Paul Boddington
  • 37,127
  • 10
  • 65
  • 116
0
votes
2 answers

Android: How to get allowTaskReparenting="true" to work

I am writing an app that can be launched from another app by receiving an intent with ACTION_VIEW or ACTION_EDIT. For example, it can be opened by viewing an email attachment. The trouble is that when you click on the home button and click again on…
Paul Boddington
  • 37,127
  • 10
  • 65
  • 116
0
votes
1 answer

Android evicting task history when background processes constrained to 1

Scenario: My application does the following: Shows a button When I click button, a new activity is displayed from a different application within my task. I expect that if I click back within that new activity, I'd be returned to my application. …
UsAaR33
  • 3,536
  • 2
  • 34
  • 55
0
votes
1 answer

Android: Default actions of Back Button

I know that when we press back button, the default function onBackPressed() is called. http://developer.android.com/reference/android/app/Activity.html#onBackPressed() This doc say that "The default implementation simply finishes the current…
Keith Mak
  • 453
  • 1
  • 5
  • 16
-1
votes
1 answer

android, put two activities on stack simultaneously

My app main launcher is the LoginActivity which, in most of the cases, at the end start MainActivity from where all actions in my app can be launched This is the "normal" scenario however, when someone lauches the app from share context, or…
Rafael Lima
  • 3,079
  • 3
  • 41
  • 105
-1
votes
5 answers

how to send values from one activity to another extended activity in android?

I am developing an application in which I have a common activity, i.e. BaseActivity, I am extending it to all other activities in my application. I run few AsyncTask in BaseActivity to reflect in all other activities. My query is I need to pass…
1 2 3
8
9