详情见: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("
2021-11-06 13:54:22 75KB 静默安装卸载
1
支持android5.1静默安装、卸载代码,封装在PackageInstaller模块内,在执行时可能需要修改部分framework代码使功能正常使用。
2021-07-22 10:30:40 14KB PackageInstaller
1
详情见: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("android.intent.action.SILENT_PACKAGE_DELETE"); intent.putExtra("silent_delete_package", "com.example.helloworld");//指定需要卸载apk的包名 sendBroadcast(intent);
2021-05-28 16:43:54 104KB 静默安装卸载
1
Android10.0 静默安装、卸载接口
2021-02-06 21:01:29 9KB android
1