Android app restarts when opened by clicking app icon

后端 未结 5 551
情书的邮戳
情书的邮戳 2021-01-04 00:00

Scenario :

I open my app by clicking icon, do something, navigate through activities, pause the app by clicking home button.

Case 1:

If I

5条回答
  •  失恋的感觉
    2021-01-04 00:30

    I found it. I had set a flag android:launchMode="singleTask" in my activity flag. I deleted that code.

    I also added onsaveInstance method to all the activities in my code and it's working now!

    Thanks :)

提交回复
热议问题