原文地址:
http://hi.baidu.com/xunlerei/blog/item/c8e8e51743b8f8164a90a703.html
人說的終極退出方法:
Intent startMain = new Intent(Intent.ACTION_MAIN);
startMain.addCategory(Intent.CATEGORY_HOME);
startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(startMain);
System.exit(0);
實際上這種方法只是返回了Home頁面,如果你再次進入應用,你會發現進入的首界面是你先前沒有關閉的Activity。