如何杀死在Android的
问题描述:
进度
,当我试图退出,我运行下面的代码,但我不能杀的进展,如何杀死在Android的
所以如果我重新启动我的应用程序,另一个进步started.what事?
我退出代码:
Intent startMain = new Intent(Intent.ACTION_MAIN);
startMain.addCategory(Intent.CATEGORY_HOME);
startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(startMain);
System.exit(0);
finish();
答
使用此代码来结束你的应用程序
finish();
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.addCategory(Intent.CATEGORY_HOME);
startActivity(intent);
为uploding你需要增加你的信誉得分是图像1现在...你需要为了获得使用此功能的特权,请在网站上注册至少10个声望的成员http://meta.stackexchange.com/questions/75491/how-to-upload-an-image-to-a-post – 2012-07-19 08:52:26
这个活动是你的根源活动还是只活跃在堆栈中? – 2012-07-19 08:55:46
http://*.com/questions/2092951/how-to-close-android-application – 2012-07-19 08:57:49