0

I've developed an Android application with multiple screen. Application works fine but rarely application crashes at some points. If the application crashes it kept on crashing on other screens too.

After re-starting the application it works fine. How can I make sure user restarts the application if application crashes at a point?

I have been searching online all night but couldn't come up with an answer.

Thanks in advance for your time.

Jay Mayu
  • 17,023
  • 32
  • 114
  • 148
  • 2
    I think finding the cause of application crash, and remove that is the best solution. But if not possible in your case then these links http://stackoverflow.com/questions/2470870/force-application-to-restart-on-first-activity-android and http://stackoverflow.com/questions/2681499/android-how-to-auto-restart-application-after-its-been-force-closed may help you. – Pankaj Kumar Nov 04 '11 at 04:57
  • possible duplicate of [Android Force Close](http://stackoverflow.com/questions/5455868/android-force-close) – Labeeb Panampullan Nov 04 '11 at 04:58
  • What do you mean by restart? Kill the process? When it "crashes", do you let it fully crash, or do you catch exceptions and log them or show an error? The only thing I can think of is you're keeping something in memory that only gets initialized on your start screen, and the app crashes, then goes back to a different screen. In any case, first fix why it needs a restart (it shouldn't) then fix your bugs. Users won't both to restart an app completely. – Kevin Galligan Nov 04 '11 at 05:02
  • The problem is I couldn't recreate the error. even same steps followed. errors shows up rarely on users phone. Not even on my dev phone. :( – Jay Mayu Nov 04 '11 at 05:13

1 Answers1

1

I would suggest fixing the problem that causes the application to crash instead of worrying about relaunching the app.

As a user, I would be much happier if the app worked, instead of restarting when it failed. And if it failed, who's to say I even want it to start up again?

spatulamania
  • 6,613
  • 2
  • 30
  • 26