1. Are you ready for the Galaxy S20? Here is everything we know so far!

Force Stop buton and restart app

Discussion in 'Android Development' started by merthkm, May 5, 2020.

  1. merthkm

    merthkm Lurker
    Thread Starter

    How can I restart the application when the user presses the force stop button? I'll be happy if you can help me.
     



    1. Download the Forums for Android™ app!


      Download

       
  2. Hadron

    Hadron Smoke me a kipper...
    VIP Member

    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.
     
Loading...

Share This Page

Loading...