• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Force Stop buton and restart app

merthkm

Lurker
How can I restart the application when the user presses the force stop button? I'll be happy if you can help me.
 
You mean that you want your app to restart even if the user explicitly stops it and doesn't choose to restart it? Can I ask why?

Obviously the app itself cannot do this - if it is stopped then it isn't running any more and so can't restart itself. What you need is something else to restart it, either the operating system or some other process. I'm not an android developer so can't say whether there is a way of telling the OS that this app is so important it must be restarted if it isn't running. As a user I'd probably uninstall an app that simply respawned if I deliberately stopped it though.
 
Back
Top Bottom