App completely restarting when launched by icon press in launcher

前端 未结 14 2120
灰色年华
灰色年华 2020-11-29 03:02

I\'m in the process of trying to make a release build of my first android app to send to a few testers. However, I ran into a problem with it. When you exit the app and then

14条回答
  •  清歌不尽
    2020-11-29 03:38

    It is the default behavior in Android. For the debug builds it works differently for some reason. It can be solved by adding android:launchMode="singleInstance" to the activity, you want to restart after you launch from the icon.

提交回复
热议问题