Closing Application and killing it from ram

后端 未结 3 1341
忘了有多久
忘了有多久 2021-01-26 08:41

hi I want to close my application and also want kill it from ram by clicking button. i am using this method, but it just minimize application and didn\'t close complete app. wha

3条回答
  •  说谎
    说谎 (楼主)
    2021-01-26 09:32

    use single line code

    System.exit(1);
    

    or

    android.os.Process.killProcess(android.os.Process.myPid());
    

提交回复
热议问题