上传者: sj13120545905
|
上传时间: 2021-11-06 13:54:22
|
文件大小: 75KB
|
文件类型: -
详情见:Android 静默安装和静默卸载(系统层)
http://blog.csdn.net/zhouyuanjing/article/details/78507606
安装:
Intent intent = new Intent("android.intent.action.SILENT_PACKAGE_INSTALL");
intent.putExtra("silent_install_file", "/sdcard/Helloworld.apk");
intent.putExtra("silent_install_auto_start", true);//是否安装并启动
intent.putExtra("silent_install_start_clazz", "com.example.helloworld.MainActivity");//如果安装并启动,则需指定activityName
sendBroadcast(intent);
卸载:
Intent intent = new Intent("