How to close Android application?

后端 未结 22 1556
小蘑菇
小蘑菇 2020-11-22 07:17

I want to close my application, so that it no longer runs in the background.

How to do that? Is this good practice on Android platform?

If I rely on the \"ba

22条回答
  •  深忆病人
    2020-11-22 07:59

    The best and shortest way to use the table System.exit.

    System.exit(0);
    

    The VM stops further execution and program will exit.

提交回复
热议问题