Alternative to Intent.FLAG_ACTIVITY_CLEAR_TASK

后端 未结 6 1091
傲寒
傲寒 2021-02-06 22:59

I have two apps App-B launches App-A. If the user starts App B from inside App A I call finish on App-A so I have no problem.

If the user goes straight to App B from th

6条回答
  •  南笙
    南笙 (楼主)
    2021-02-06 23:05

    I may be wrong in understanding what you are asking, but is it that when you launch B, you want A to be killed?

    In A, add this to the activity tag in the manifest:

    android:noHistory=true
    

    This will cause the activity to be removed from memory as soon as it loses focus.

提交回复
热议问题