Android :: Way To Tell When Task Goes To Back Of Stack?

Mar 23, 2009

Is there a way to tell when my task gets put on the back of the UI stack (user pressed "home" say?) I have some resources I'd like to free when not foregrounded. The lifecycle routines seem dicey to use to try and infer this. The "home" key does not seem to be passed to onKeyDown(), and moveTaskToBack() is never called by the system so I can hook it. I can poll the ActivityManager for running activities with my task id, but hard to find a good time to call this.

Android :: Way to tell when task goes to back of stack?


Android :: How To Clear Activity Stack In Task

Jan 6, 2010

I have three activities. Activity A start activity B by the method startActivityForResult, and Activity B start activity C by the method startActivity. Then, after starting activity C, activity B kill himself by finish(). Now the task stack stored two activities: A and C. My question is: how can I finish activity A when I finish activity C. or how can I clear the whole stack of the task.

View 5 Replies View Related

Android :: View Task's Activity Stack

Mar 14, 2010

I just started developing a simple Android application while I'm still learning its platform. I'm using Eclipse IDE with the ADT plugin 0.9.6 and I need to know if it's possible to view the activity stack that is associated with a Task. Is there any way through the DDMS tool or through any other technique?

View 4 Replies View Related

Android :: Keep Task's Activity Stack After Restart From Home

Jan 13, 2010

My application has two activities, that I start in this order: HOME > A > B Now I press HOME and launch "A" again. I would like to see activity "B" on a top of "A", but instead I get "A" - so the activity stack is cleared. Manifest: <activity android:name=".activity.A" android:label="A" android:always Retain Task State = "true">What should I do?

View 2 Replies View Related

Android :: Odd Behaviour With Launcher's Task Stack Handling

Aug 6, 2010

I have an application with two activities, A and B. A is the root activity, which then starts B.When the stack looks like this: HOME > A > B and I select A from the launcher, I want it to resume the task without clearing the stack, so B is shown. Right now this is mostly working. However. In certain circumstances this occasionally does not work. What we see in this situation is that invoking A from the launcher will create a new instance of A and add it to our task's stack: HOME > A > B > A If we go back to home and select A again, we'll get another one: This happens if, and only if, we uninstall the application completely using the application manager, and then reinstall it, via a file browser. Installing the application with adb does not cause this problem to appear.In addition, when this problem manifests, if we then reboot the device, the problem goes away and everything starts behaving correctly! This is smelling suspiciously like a launcher bug can anyone shed light on this? This is using Eclair on real hardware (not the emulator).Update I have more information. It seems this is an Android core bug; see http://code.google.com/p/android/issues/detail?id=5277 in the Android bug tracker. Apparently running an application just after it's been installed by pressing the 'Run' button will run the application in a subtly wrong way. It's also still extant on Froyo, not just Eclair. Does anyone have any suggestions as to any possible workarounds?

View 1 Replies View Related

Android :: Task Activity Stack Always Reset When Launched From Home

Mar 24, 2009

I am just starting on an Android app and I am puzzled about why my Task activity stack is being reset any time the application is launched from the Home screen. I used the ADT tools to create the application in Eclipse. The main activity is ".UserLaunch" and it starts the activity ".About" when the user presses a button. If the user then presses HOME and then relaunches the app, .UserLaunch is displayed and is the only thing on the stack.

.UserLaunch has the launchMode singleTask. .About is standard. According to the documentation at http://developer.android.com/guide/topics/fundamentals.html#lmodes: "However, a "singleTask" activity may or may not have other activities above it in the stack. If it does, it is not in position to handle the intent, and the intent is dropped. (Even though the intent is dropped, its arrival would have caused the task to come to the foreground, where it would remain.) "The Task stack should be brought to the foreground and .About should still be displayed. I added Logging to all of the lifecycle events (edited to remove timestamps and shorten DEBUG/ and INFO/ to D/ and I/) and you can see that when HOME is pressed, .About cycles through onPause and onStop (as expected). Then when the app is again launched, .About is destroyed and .UserLaunch is restarted D/UserLaunch:(670): onCreate() D/UserLaunch:(670): onStart() D/UserLaunch:(670): onResume() I/ActivityManager(52): Displayed activity com.cequint.cityid/.UserLaunch: 4910 ms I/ActivityManager(52): Starting activity: Intent { comp= {com.cequint.cityid/com.cequint.cityid.About} } D/UserLaunch:(670): onPause() D/About(670): onCreate() D/About(670): onStart() D/About(670): onResume() I/ActivityManager(52): Displayed activity com.cequint.cityid/.About: 1031 ms D/UserLaunch:(670): onStop() I/ActivityManager(52): Starting activity: Intent { action=android.intent.action.MAIN categories= {android.intent.category.HOME} flags=0x10200000 comp= {com.android.launcher/com.android.launcher.Launcher} } D/About(670): onPause() D/About(670): onStop() D/dalvikvm(670): GC freed 413 objects / 34128 bytes in 72ms I/ActivityManager(52): Starting activity: Intent { action=android.intent.action.MAIN categories= {android.intent.category.LAUNCHER} flags=0x10200000 comp= {com.cequint.cityid/com.cequint.cityid.UserLaunch} } D/About(670): onDestroy() D/UserLaunch:(670): onRestart() D/UserLaunch:(670): onStart() D/UserLaunch:(670): onResume() Here is the relevant section of the Manifest: <application android:icon="@drawable/icon" android:label="@string/ app_name"> <activity android:name=".UserLaunch" android:label="@string/app_name" android:launchMode="singleTask" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name=".About" android:launchMode="standard"> </activity> </application> Anyone have any ideas why this is always resetting the Activity Stack?

View 11 Replies View Related

Android :: How To Detect If Current Stack Of Activities (task) Moves To Background?

Jul 23, 2010

The official documentation describes tasks as follows: All the activities in a task move together as a unit. The entire task (the entire activity stack) can be brought to the foreground or sent to the background. Suppose, for instance, that the current task has four activities in its stack three under the current activity. The user presses the HOME key, goes to the application launcher, and selects a new application (actually, a new task). The current task goes into the background and the root activity for the new task is displayed. Then, after a short period, the user goes back to the home screen and again selects the previous application (the previous task). That task, with all four activities in the stack, comes forward. Is there a way to programmatically detect when the task of the current Activity moves into and out of the background? I would like to know when the user has switched switched to another application, vs. when the user navigated to another Activity in the current app.

View 2 Replies View Related

Android :: Any Way To Go 2 Steps Back In Activity Stack?

Apr 7, 2010

Android - Can I force BACK button to go 2 steps back in the Activity stack with some kind of code? I know I can override the onKeyDown method but I want BACK to do it's thing, just twice!

View 3 Replies View Related

Android :: How To Manipulate Activity Back Stack?

Nov 22, 2010

I want to implement the following logic. I have 4 activites A, B, C and D. The flow is A -> B -> C -> D When the user navigates from A -> C he should be able to get back to the previous activities by pressing the back button. But after reaching D pressing the back button should take him to activity A. And pressing the back button againg should exit the application instead of taking him back to B / C / D. How do I do it.

View 1 Replies View Related

Android :: How To Clear Stack Back To Root Activity When User Leaves Application?

Jan 25, 2010

I have an application with 2 activities, LogonAct and MainAct. LogonAct is a logon activity which I want to force the user to go through each time they return to the application. I've set android:clearTaskOnLaunch="true" on LogonAct.

View 1 Replies View Related

Android :: On Logout Clear Activity History Stack Preventing Back Button

Jun 9, 2010

All activities in my application require a user to be logged-in to view. Users can log out from almost any activity. This is a requirement of the application. At any point if the user logs-out, I want to send the user to the Login Activity. At this point I want this activity to be at the bottom of the history stack so that pressing the "back" button returns the user to Android's home screen.

I've seen this question asked a few different places, all answered with similar answers (that I outline here), but I want to pose it here to collect feedback. I've tried opening the Login activity by setting its Intent flags to FLAG_ACTIVITY_CLEAR_TOP which seems to do as is outlined in the documentation, but does not achieve my goal of placing the Login activity at the bottom of the history stack, and preventing the user from navigating back to previously-seen logged-in activities. I also tried using android: launchMode ="singleTop" for the Login activity in the manifest, but this does not accomplish my goal either (and seems to have no effect anyway). I believe I need to either clear the history stack, or finish all previously- opened activities. One option is to have each activity's onCreate check logged-in status, and finish() if not logged-in. I do not like this option, as the back button will still be available for use, navigating back as activities close themselves. The next option is to maintain a LinkedList of references to all open activities that is statically accessible from everywhere (perhaps using weak references). On logout I will access this list and iterate over all previously-opened activities, invoking finish() on each one. I'll probably begin implementing this method soon.

I'd rather use some Intent flag trickery to accomplish this, however. I'd be beyond happy to find that I can fulfill my application's requirements without having to use either of the two methods that I've outlined above. Is there a way to accomplish this by using Intent or manifest settings, or is my second option, maintaining a LinkedList of opened activities the best option? Or is there another option that I'm completely overlooking?

View 2 Replies View Related

Android :: How To Navigate From HOME Back To A Paued Task?

Jan 21, 2009

I'm having trouble to figure out how to bring the paused Task back to foreground. As far as I understood, when I click HOME button while a task is running, the task will be paused (onPaused() of the current top-level activity will be called,right?). I think there might be a way to bring this paused task back to foreground since the task is still ALIVE, but I don't know how. Do I have to put some more codes in the activity (I mean the one that is paused)?

View 5 Replies View Related

Android :: Async Task And Passing Message Back To UI Thread

Mar 5, 2010

I have a simple app and I'm using the AsyncTask to test out a background process, for clearness purposes I've opted to put my AsyncTask in a separate class rather than in an inner class, which where my problems begin, this is my AsyncTask. Code...

View 8 Replies View Related

Android :: Force User To Complete A Task Before Pressing Back?

Mar 21, 2010

I show to user a list of categories, he must choose one.
How to force the user to choose before pressing back?

View 4 Replies View Related

Sprint HTC Hero :: Can I Put Advanced Task Killer Back On?

Feb 25, 2010

I took of Advanced Task Killer when I put Fresh and Gumbo on since some have said that they don't play nice. I sometimes mess up and don't close out the app by hitting the back button. My phone starts to warm up and the battery starts draining. How do I see what apps are running so I can close them out so that I don't kill my battery? Can I put Advanced Task Killer back on?

View 11 Replies View Related

Android Program For Adding Task And Deleting Task In Listview

Aug 25, 2012

I'm writing an android program for adding task and deleting task in listview. I've add an onClickListener to the delete button so it can delete the task. However I was told I should not have the listener in the adapter violating mvc. how I can remove a task in my TaskListItem class. I got the method removeTask() in the adapter, but don't how I can use it in the TaskListItem class.

Code:
public TaskListItem(Context context, AttributeSet attrs) {
super(context, attrs);
mContext = context;
[code]...

View 1 Replies View Related

Android :: Task List Or Task Chooser App

Dec 12, 2009

Is there an app for choosing which apps you want to use that are already open or whatever. Or is there a button you can press to bring up a task list like you do with you blackberry when u hold the blackberry key and the list of open apps comes out.

View 5 Replies View Related

Android :: Best App Killer (task, Advanced Task Or Something Else)?

Dec 27, 2009

Automatic task killer, advanced task killer, or something else?

View 18 Replies View Related

Sprint HTC Hero :: Task Panel X - Advanced Task Manager - Causing Errors

Nov 7, 2009

I've been using Task Panel X and Advanced Task manager to kill unneeded tasks and keep memory at a maximum.

Recently, every time I open Task Panel X and then revert back to Home screen I get the HTC logo and then a loading screen while the device sets itself. This happens even if I kill NO tasks.

So my solution was to uninstall Task Panel X and then use just Advanced Task Manager. All the sudden, same result.

Everytime I open either of these apps and then go back to home screen I get a BLACK SCREEN WITH HTC LOGO, THEN A BRIEF (10 SECONDS) LOADING SCREEN. THEN ALL IS NORMAL.

View 7 Replies View Related

HTC Droid Eris :: Task Killer - Task Manager

Dec 11, 2009

I know this was talked about before at different times but I still have 3 questions.

1. what is the difference between a task killer and a task manager?

2. should we be using one of these apps or not?

3. when you look at the awake time if it is like 70% or 80% and you aren't using the phone a bunch I take it that means something is running,how can you find what is running.and is the awake time that big of deal?

View 27 Replies View Related

Sprint HTC Hero :: How To Use - Task Manager - Task Killer App

Oct 15, 2009

Looking for a guide on how to use task killer. I had task killer on and deleted it. I think I was killing tasks that were needed to keep certain functions running that I use frequently. If someone would take the time to help me understand how to use one, I think I would be much more successful with it.

example - text messaging just stopped ( werrent receiving them ) . Once I took task killer off, everything started working again.

View 7 Replies View Related

Android :: Stack Of Activity From Activity Stack

Nov 2, 2009

There is a stack of activity i want to call the activity from that stack , My question is that is it possible to check from that stack and call that intent.When i press home button and again when i press the executable it should start the activity where i have left .Is it possible?Any example related to the same would be great help

View 3 Replies View Related

Android :: Favorite Task Killer - Manager - Advanced Task Killer Free

Aug 22, 2009

Anyway, I just wanted for everyone to post their favorite Task Manager/Killer, and why, and if there are any flaws. I personally use Advanced Task Killer Free. It has a simple UI, and the when you select or unselect apps it remebers it so next time you launch the app you can only remove the apps that you usually do, and keep ones that always run. It doesn't slow down or break the system.

View 40 Replies View Related

Motorola Droid X :: Automatic Task Killer Vs Advanced Task Killer

Sep 9, 2010

Has anyone used both. Ive heard that that Advanced Task Killer, still drains the battery. What about the Automatic Task Killer, which puts everything to sleep when not in use.

View 8 Replies View Related

Motorola Droid X : Back Button Functionality - Cannot Simply Go Back One Menu Using The Back Key

Jul 15, 2010

This is my first android device and i'm loving it... but one thing that irks me is the use, or lack thereof, of the back button.

As I am navigating menus and options in the Settings, I cannot simply go back one menu using the back key. For example, if I go to Settings->Battery Manager->Battery Profile Options and want to go back to the Settings screen, I cannot.

Pushing the back button does nothing and I can only go back to the Settings menu by going Home, then re-entering.

Another quirk regarding the back button is when reading emails. Using a regular email account such as Hotmail, I cannot simply read an email and go back to the inbox using the button.

It makes navigating the phone very tedious.

View 5 Replies View Related

Android :: Stack Based JVM

Dec 21, 2009

can any one tell me what is d actual diff in Stack based and Register based JVM?

View 2 Replies View Related

Android :: SIP Protocol Stack

Oct 12, 2010

How can i implement SIP protocol in android.I want to make video conferencing application using SIP protocol.So is it feasible using SIP protocol and how to start.

View 1 Replies View Related

Android :: Is There Any Stack For RTP / New SDK Support This?

Dec 1, 2009

Hello all, I am new in android developer and I would like to make a sip based application for this platform. In the signaling part I have found about jain-sip (used it) and sipdroid( any good tutorial? ) the problem starts when I want to stream data from a phone to a server. So the question is: Is there any stack for RTP? does the new SDK support this? I have found this: http://www.hsc.com/tabid/87/ItemId/20/Default.aspx have anyone used this stack? also I found this video on youtube :http://www.youtube.com/watch?v=g1NHEsXFEns which demonstrates the use of rtp to stream video/audio is this fake does any one know how? also I have read somewhere on the net that sipdroid has support for rtp is this correct? thanks in advanced and sorry for the long list of questions regards maxsap

View 4 Replies View Related

Android :: Bluetooth Stack Becomes Unresponsive

Apr 13, 2010

After Bluetooth connection is lost. Bluetooth stack on HTC Legend is messed up. Nothing works till Bluetooth is turned off and on. Here is the sample, the problem is blocking read on the thread but InputStream.available call always returns 0 and cannot be used to implement some ugly, busy-waiting workaround. package com.example.android.disconnectproblem; import java.io.IOException; import java.io.InputStream; import java.io.InvalidObjectException; import java.io.OutputStream; import java.util.UUID; import android.app.Activity; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothDevice; import android.bluetooth.BluetoothSocket; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.ListView;

View 7 Replies View Related

Android :: Clear Activity Stack?

Nov 3, 2009

Is there a way to clear our Activity stack? For example, a user in my app progresses through these activities, one is launched from the previous activity: ActivityA -> ActivityB -> ActivityC if the user is now looking at ActivityC, and they hit the back button, they will go back to ActivityB. Is it possible to add a menu to ActivityC where the user can clear their activity stack, and then launch a new instance of ActivityA? This would be so the user can jump to a particular activity in my application without getting confused with the back button + history,

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved