How can I programmatically close an application?

后端 未结 5 1190
抹茶落季
抹茶落季 2021-01-14 02:08

I am looking for code for a button that completely closes my app.

I tried with some stuff from Google, but my app is still running in the background. I need to close

5条回答
  •  不知归路
    2021-01-14 03:07

    have in mind that:

    finish();
    

    method closes current Activity only. If you have multiple Activities opened, you should call finish() per Activity.

    Note: Closing Service is different.

提交回复
热议问题