[android-developers] Re: restart application after Android's killed it

2011-07-21 Thread nadam
That depends on how the user goes back to the application. If they click on the launcher icon, they will go to the launcher activity. If they navigated back to the destroyed activity via the BACK button or something like that, they will go to that specified activity. This is not true for my

Re: [android-developers] Re: restart application after Android's killed it

2011-07-21 Thread Dianne Hackborn
On Thu, Jul 21, 2011 at 4:12 PM, nadam ad...@anyro.se wrote: This is not true for my devices. At least not after manually destroying an app using a task manager. I get the same behavior from launcher icon and back button. On HTC Hero with Android 2.1, I always end up in the launcher activity.

[android-developers] Re: restart application after Android's killed it

2011-07-20 Thread Fina Perez
Well, the problem is that when the program is killed, due to android policies or because of an error, sometimes the program is restarted in the last activity that was displayed. In my application, when this happens, I have an error and the program is force to close because I'm missing some data

Re: [android-developers] Re: restart application after Android's killed it

2011-07-20 Thread Nick Risaro
mmm I think that you need to save all that data via shared preferences (or something like that) when your app is about to be killed. You can check the javadoc for Activity#onPause() and the Spinner sample that comes with the SDK. On Wed, Jul 20, 2011 at 10:56 AM, Fina Perez fina.pere...@gmail.com

Re: [android-developers] Re: restart application after Android's killed it

2011-07-20 Thread Kostya Vasilyev
Then you have a bug that needs to be fixed. Putting band-aids over broken code is likely to make it only worse in the long run. Try initializing your data on-demand, so it's available to any activity that may need it. FWIW, there a manifest flag that resets the stack to the main activity,

[android-developers] Re: restart application after Android's killed it

2011-07-20 Thread lbendlin
if you want to return to a particular activity when the application is (re)launched you can specify that in the manifest android:launchMode=singleTask android:alwaysRetainTaskState=true are two things worth reading about. -- You received this message because you are subscribed to the Google

Re: [android-developers] Re: restart application after Android's killed it

2011-07-20 Thread Dianne Hackborn
That has nothing to do with what happens when the process is killed. Processes being killed in the background is invisible to the user. The UI flow they go through is absolutely not intended to change just based on whether a process is killed, because it is basically random when that will