<span style="font-size:18px;"><span style="white-space:pre"> </span>PackageManager pm = getPackageManager();
//通过包名得到要启动这个应用程序的Intent;
Intent intent=pm.getLaunchIntentForPackage(appinfo.getPackageName());</span>
<span style="font-size:18px;"><span style="white-space:pre"> </span>//因为有的系统程序,不能被启动,会返回null,所以要判断一下
if(intent!=null){
startActivity(intent);
}
else{
Toast.makeText(AppManager.this, "这个应用程序不能被启动", 1).show();
}</span>