1. 卸載:
Uri packageURI =Uri.parse("程序完整的路徑");
IntentuninstallIntent = new Intent(Intent.ACTION_DELETE, packageURI);
startActivity(uninstallIntent);
2. 安裝:
String str ="apk的完整路徑";
Intent intent = newIntent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(newFile(fileName)), "application/vnd.android.package-archive");
startActivity(intent);
3. 後臺靜默安裝:稍後添加...