美文网首页
Android 8.0 允许安装未知来源权限

Android 8.0 允许安装未知来源权限

作者: 温一 | 来源:发表于2019-11-29 19:41 被阅读0次

Android 8.0 允许安装未知来源权限
public void installApk(View view) {
File file = new File(Environment.getExternalStorageDirectory(),
"testandroid8-debug.apk");
Intent intent = new Intent(Intent.ACTION_VIEW);
// 仅需改变这一行
FileProvider8.setIntentDataAndType(this,
intent, "application/vnd.android.package-archive", file, true);
startActivity(intent);
}

https://www.jianshu.com/p/baa13455cd79

https://github.com/steven2947/FitAndroid8

相关文章

网友评论

      本文标题:Android 8.0 允许安装未知来源权限

      本文链接:https://www.haomeiwen.com/subject/cwagwctx.html