tags:

views:

64

answers:

3

Hello In my android application,on exit of application by using movetasktoback(true) on back of Homescreen,if the user reloads the application again ,the user is redirected directly to Homepage other that to loading screen. Is there any solution that i could exit the application on Home and wherein should clear all the stack created in this app.

Please share your valuable suggestions.

Thanks in advance:)

A: 

Try to kill your process, like:

android.os.Process.killProcess(android.os.Process.myPid());
barmaley
+1  A: 

There are lot of discussions that has happened with respect to this topic. Killing the process is certainly not the best way to go.

You can try setting android:finishOnTaskLaunch as true to your root activity or try using android:clearTaskOnLaunch

http://developer.android.com/guide/topics/manifest/activity-element.html#finish

Rahul
A: 

May be you should consider another way of resolving the problem. Try not to exit the application but somehow override the onResume() method.

Vladimir Ivanov