Android 使用installPackageAsUser安装apk流程

应用层安装(Android7.1)

IPackageManager mPm = IPackageManager.Stub.asInterface(ServiceManager.getService("package"));
File apkFile = new File(InstallApk);//InstallApk绝对路径
mPm.installPackageAsUser(Uri.fromFile(apkFile).getPath(), null, 2, apkFile.getName(), mContext.getUserId());

https://blog.csdn.net/Dr_Unknown/article/details/77452008?locationNum=6&fps=1

你可能感兴趣的:(Android 使用installPackageAsUser安装apk流程)