<span style="white-space:pre"> </span>Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); //如果没有添加这条,安装完毕后不会有打开选项,而是直接退出。
intent.setDataAndType(Uri.fromFile(file), "application/vnd.android.package-archive");
startActivity(intent);
android调用系统安装apk
最新推荐文章于 2024-06-28 10:19:07 发布