//apk安裝
String name = apkInfos.get(pos).packageName;
Intent intent = pm.getLaunchIntentForPackage(name);
if (intent == null){
Log.d(tag, "can not get intent: " +
name);
return;
}
ApkDialog.this.dismiss();
startActivity(intent);
}
});
//apk卸載
Uri uri = Uri.fromParts("package",
apkInfos.get(pos).packageName,
null);
Intent intent = new Intent(Intent.ACTION_DELETE, uri);
ApkDialog.this.dismiss();
startActivity(intent);
}
});
這麼明顯的代碼,還用注釋。