0

When I open my app and click home btn, and then open my app again, on some devices it restarting. I've disabled "Do not save activities" in Developer settings.

  • Can you show your code for home button and the homepage code? – FreakyAli May 15 '18 at 11:58
  • I do not have any code that fired when home button is pressed – Николай Мартынюк May 15 '18 at 12:00
  • Oh okay now I understand your home button you mean the hardware menu button, Okay so it restarts because you are not saving its instances check this out https://stackoverflow.com/questions/151777/saving-android-activity-state-using-save-instance-state – FreakyAli May 15 '18 at 12:04
  • @G.hakim, thank you, but it seems that the problem is that there are option "MIUI Optimization" was enabled. At least, disabling it helped on MIUI, but the problem still appears on Asus android device. – Николай Мартынюк May 15 '18 at 13:41
  • Please add log in Activity's lifecycle method, and test it again, then show the log in your question. From the log, check what is happening in your Activity. – Robbit May 17 '18 at 06:47

0 Answers0