Close all running activities in an android application?

后端 未结 11 1772
死守一世寂寞
死守一世寂寞 2020-12-11 19:19

I create one application and never use finish() for each activity. If my user clicks on the logout button it goes to the previous page.

How can I close my previous

11条回答
  •  情书的邮戳
    2020-12-11 19:34

    In general android main stack for all you activity your launching and remove it based on the way you call to next activity. If you want to clear all activity set this flag Intent.FLAG_ACTIVITY_CLEAR_TASK while launching activity in order to clean up previous activity.

提交回复
热议问题