【so easy~】完全退出

 

String packagename = getPackageName();

ActivityManager manager = (ActivityManager)getSystemService(ACTIVITY_SERVICE); 

finish();

if(getSystemVersion()<8){

  

manager.restartPackage(getPackageName()); 

}else{

manager.killBackgroundProcesses(packagename); 

}

http://androiddada.iteye.com/

你可能感兴趣的:(android)