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?

Android :: Odd behaviour with launcher's task stack handling


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.

View 5 Replies View Related

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 :: 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 : K-9 Notification Behaviour Change

Jun 15, 2010

In an older version of k9, when tapping onto a notification, it would open k9 but it would only show the unread emails.

for some reason its showing all emails including read emails, how'd i change it back to show only unread emails (across all accounts)?

View 2 Replies View Related

Android :: Default Behaviour Of The Back Button

Sep 17, 2009

what the default behaviour of the back button is, as far as the Android platform is concerned.

For example, in the Contacts Application, if I am creating a contact, I just key in a name, and the press back button, the contact is saved with only the name. Fair enough. But, I then edit this contact to include a phone number and press back button. This contact is updated which now includes the phone number. I again edit this contact. This time I remove the name, as well as the phone number and press the back button. I get a message saying, "Contact doesn't exist". In this case, it deletes the contact. :(

In the mail appllication, while composing, when I press back, it goes to the drafts folder. Thats good. But, if I just have to cancel this, and I don't want this to go to drafts folder. For this, I have to open the menu, and select "Cancel".

View 4 Replies View Related

Android :: SetChoiceMode - GetSelectedItemPosition & Inconsistent Behaviour

Feb 18, 2009

Got an activity that extends ListActivity. The list is backed up by a custom adapter that extends BaseAdapter. -- getListView().setFocusable(true); getListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE); -- I do a simple (getSelectedItemPosition() == == ListView.INVALID_POSITION) check in onPrepareOptionsMenu() to disable the items that require an item to be selected.

Now, what I do after launching the activity (the action takes place under emulator, ver.1.1) an what it looks like: 1) Hit menu - the menu items are disabled - OK 2) Select an item with mouse wheel and hit menu - the items get enabled - OK 3) Click anywhere outside the list, repeat 2). The items don't get enabled - WTF? 4) Start from scratch, select an item hitting Del and moving mouse. The result is the same as for 3).

Why do these (3, 4) things keep happening to me?

View 3 Replies View Related

Android :: Regarding Search Hard Key Behaviour With Progress Bar

Jul 28, 2010

When a progress dialog is displaying and we press search hard key it closes and moves to search bar of phone, even if if the progress Dialog setcancellable value is set false.

View 1 Replies View Related

Android :: SensorManager Strange Behaviour Of GetOrientation

Jul 7, 2010

I need to retrieve the orientation of my phone. At the moment i wrote this :

CODE:................

This code allows me to get the orientation of the phone if i leave the phone on a flat surface and i rotate it over the surface.

What i did not understand is why if i move the phone upwards the value of this.actual_orientation[0] ,which is the rotation on the zed axis as described [here][1], the value increases although there was no rotation.

Did someone know what happens?

Another strange thing..

I tried my application in the office at work and it had the strange behaviour i described before..
I tried in the same office(same situation) a compass app that i took from the market and it has the same behaviour of mine..when i moved the phone upwards the value changed consistently..
I tried in the same office(same situation) the i-phone compass and it didn't have that strange behaviour!

Then when i arrived at home i tried both, my application and the compass app of my android phone, and they worked!even if i move upwards the phone the value are stable...

View 1 Replies View Related

Android :: How To Override ENTER Key Behaviour Of Virtual Keyboard?

Jul 20, 2010

I want to override the behaviour of the ENTER key of the virtual keyboard so that:

* when there are more fields on the screen, it 'tabs' to the next field.

* when it is the last field of the screen, it performs the default action of the screen

I've been playing with the IME options and labels, but just don't get what I want. Anybody a suggestion?

View 3 Replies View Related

Android :: Override ENTER Key Behaviour Of Virtual Keyboard

Jul 17, 2010

I want to override the behaviour of the ENTER key of the virtual keyboard so that:when there are more fields on the screen, it 'tabs' to the next field when it is the last field of the screen, it performs the default action of the screen.I've been playing with the IME options and labels, but just don't get what I want. Anybody a suggestion?

View 1 Replies View Related

Android :: Control Trackball Behaviour In Droid Views?

May 27, 2009

I have a FrameLayout view which contains one (MapView-like) control and some additional buttons overlaying it. (the layout xml is below).

I want to allow the user to pan/scroll the main view using not only touch but also the Trackball.
The problem is - using the trackball just switches the focus between all the controls on the layout, and I cannot seem to find a way to contain the onTrackballEvent to just the MainView. code...

View 3 Replies View Related

Android :: Intent Activity Crash Behaviour - App Restarts Halfway Through The App

Oct 13, 2010

I have a pretty standard iPhone app that creates a series of around 7 unique Activities initialised by Intents.

However if the app crashes on the 7th Activity, the app restarts on the users phone around the 5th activity. The problem then is the info gathered from activities 1-4 is null, meaning the app is useless and the only way to get the app working again is to either continually press back or else kill the process.

Why does this behaviour occur, and is there a way to force the app to start back at the first activity when it crashes.

View 1 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

HTC Desire :: Strange Calendar Behaviour Since Froyo Update

Aug 11, 2010

I downloaded the update yesterday evening, and today I've noticed something pretty weird in my calendar. On the phone (HTC Desire) every day is stuffed full of dozens of repeating appointments, mainly birthdays. These are set to recur not just on the day they should be on, but on every day of the year. These appointments are only on the phone calendar, not on my online Google calendar. What is even more bizarre is that these repeating events come from my old Palm OS device. I don't ever remember importing them to the phone!

It makes no difference whether I use the phone's built-in calendar or Jorte (which is what I usually use). Forcing the phone and google to sync makes no difference either.

Does anyone know what's going on here? The calendar on the phone is now effectively unusable.

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

Android :: Launcher - Does Not Show Displayed Activity Log For Launcher

Aug 21, 2009

when I click on launcher it does not show displayed activity log for launcher, it shows it way before during boot up stage. why is this happening?

View 2 Replies View Related

Android :: Launcher Pro Forgets It The Default Launcher

Jul 20, 2010

I've been using LP for about a week (it's great BTW!) and this just started to happen so it could have something to do with the latest update. I've set LP at the default launcher and everything works great. However, if I ever long press the "home" button, go to an application, then press "home" again I get the popup asking me which launcher I want to use. I check the "set as default" box then select LP and everything is good again. It all works until I long press home the next time, then the remembered default is gone and I get the prompt again. I've tried rebooting, clearing defaults, etc.

View 32 Replies View Related

Android :: Best Way To Handling XML

Sep 2, 2010

Android device is much slower and have much lower memory compare to PC/server, So what is the best way to handling XML in Android? And I have a set of very complex xml needed to parse. both SAX or DOM will cause too much code. Anybody have good suggestion? I want to make it clean and fast.

View 4 Replies View Related

Samsung I7500 :: Weird Button Behaviour - Unlock Button

Jul 7, 2010

I am having problem with the screen unlock button. Whenevr I press the unlock button - it takes me to the shutdown/silence screen. I tried calling from some other phone, so the screen got unlocked but the keeyboard keeps on poping up. Tried factory rest but of no use.

View 1 Replies View Related

Android :: Exception Handling ?

Aug 9, 2010

I read somewhere not to exception handle when developing in Android, is that true?

If one does need to exception handle are there any logging tools for 2.1 and above?

If shouldn't exception handle, why is it not recommended to at least use the below?
try {body-code} catch (exception-classname variable-name) {handler-code}

View 3 Replies View Related







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