apk 安装 删除
简介:
引用:
01
//安装apk文件
02
03
private void installAPK(File file) {
04
Intent intent = new Intent(Intent.
引用:
03 |
private void installAPK(File file) { |
04 |
Intent intent = new Intent(Intent.ACTION_VIEW); |
05 |
Uri data = Uri.fromFile(file); |
06 |
String type = "application/vnd.android.package-archive" ; |
07 |
intent.setDataAndType(data, type); |
08 |
startActivity(intent); |
15 |
private void uninstallAPK(String packageName) { |
16 |
Intent intent = new Intent(Intent.ACTION_VIEW); |
17 |
Uri data = Uri.parse( "package:" + packageName); |
19 |
startActivity(intent); |