android彻底关闭应用程序方法
生活随笔
收集整理的這篇文章主要介紹了
android彻底关闭应用程序方法
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
Android SDK > 7(Android2.1)之后,即Android2.2及以后版本徹底關閉應用的方法,目前試驗只有一下方法有效:
Intent startMain = new Intent(Intent.ACTION_MAIN); startMain.addCategory(Intent.CATEGORY_HOME); startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(startMain); Process.killProcess(Process.myPid());參考?https://www.cnblogs.com/zhujiabin/p/5675005.html?
轉載于:https://www.cnblogs.com/genggeng/p/8490233.html
總結
以上是生活随笔為你收集整理的android彻底关闭应用程序方法的全部內容,希望文章能夠幫你解決所遇到的問題。