Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable android application automatic restart after a crash (Android 2.2)

Tags:

android

Is there a way to disable android application automatic restart after a crash (Android 2.2)? Application crashes and after it android restarts application. It seems that android tries to restore activity back stack and it causes issues because all data which was received from the server on login is gone.

UPDATE: my application starts with login screen on which it loads some data from server and in case of restart after crash no login is done

I see that there is simmilar question but without solution

like image 713
robert Avatar asked Sep 23 '11 11:09

robert


People also ask

How do I stop my Android from restarting?

Open Settings and tap on Device care. Click on the three dots in the upper right corner and choose Auto restart. If the option is enabled, disable it and see if this resolves your issue.

How do you auto restart an Android application after a crash or a force close error?

In order to restart your application when it crashed you should do the following : In the onCreate method, in your main activity initialize a PendingIntent member: Intent intent = PendingIntent. getActivity( YourApplication.

Why did My Android phone randomly restart?

Many Android devices are designed to shut off automatically if they become too hot. If you have your device out on a 100 degree day while trying to use 4G, GPS, and the screen is set to the brightest setting, it might restart itself or shut down. Try to take it easy and maybe disable features you don't need.

Why do my Android apps restart all over again if I minimize them how do I fix this?

What deep clean does is, whenever you minimize an app , it releases all the memory associated with that app , and hence when you again open that app, it will start as if it is new. To check the 'deep clean' option, go to the developer options of your phone. If it is not enabled please enable it.


1 Answers

  • It has a simple solution after crashing if your activity is restarting then check at start point that this activity has all required data of login or not if it has not all the data then redirect it to login activity.
like image 51
bindal Avatar answered Sep 22 '22 09:09

bindal