[android-developers] Re: Is there a way to force the application not keep running after close it?

2011-01-17 Thread Sergio Luceno
I wanna do that, because I have a task running on background. And i wanna stop it when the application is closed. This task is doing http calls every X minutes to sync the application data over internet. Also, android OS keep the state of the application and open it at the last activity where the

[android-developers] Re: Is there a way to force the application not keep running after close it?

2011-01-17 Thread Sergio Luceno
I wanna do that, because I have a task running on background. And i wanna stop it when the application is closed. This task is doing http calls every X minutes to sync the application data over internet. Also, android OS keep the state of the application and open it at the last activity where the

Re: [android-developers] Re: Is there a way to force the application not keep running after close it?

2011-01-17 Thread Kostya Vasilyev
Sergio, To stop the background task - stop the background task. It's your own code, so it's under your control. The framework tells you when things happen via activity state callbacks (onPause / onResume), you just need to do the right thing with them. For your second issue:

[android-developers] Re: Is there a way to force the application not keep running after close it?

2011-01-17 Thread Sergio Luceno
Hi! I tried to set up the setting finishOnTaskLaunch to true at all my activities... but when I click home and then open my app again, it didn't start at the main activity, it start at the same activity that was running when i clicked the home button... On 17 ene, 12:23, Kostya Vasilyev

Re: [android-developers] Re: Is there a way to force the application not keep running after close it?

2011-01-17 Thread Kostya Vasilyev
It only needs to be set on your main activity, the one you want the user to come back to. And it's not finishTaskOnLaunch, it's clearTaskOnLaunch. -- Kostya 2011/1/17 Sergio Luceno slucen...@gmail.com Hi! I tried to set up the setting finishOnTaskLaunch to true at all my activities... but

[android-developers] Re: Is there a way to force the application not keep running after close it?

2011-01-17 Thread Sergio Luceno
true, sorry i was using clearTaskOnLaunch. I tried to set this to true in the main activity... ando also in all activities. But it still not working. here is how i define my main activity. activity android:name=.Init android:label=@string/app_name

[android-developers] Re: Is there a way to force the application not keep running after close it?

2011-01-17 Thread jotobjects
it needs the android: namespace android:clearTaskOnLaunch=true On Jan 17, 8:24 am, Sergio Luceno slucen...@gmail.com wrote: true, sorry i was using clearTaskOnLaunch. I tried to set this to true in the main activity... ando also in all activities. But it still not working. here is how i