Android 解决7.0系统应用升级时下载APK安装时解析错误问题

在startActivity是添加Intent.FLAG_GRANT_READ_URI_PERMISSION

Intent installAPK = new Intent(Intent.ACTION_VIEW);installAPK.setDataAndType(uri, "application/vnd.android.package-archive");installAPK.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {    installAPK.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);}context.startActivity(installAPK);

更多相关文章

  1. 2011.07.06——— android 安装apiDemos INSTALL_FAILED_MISSING
  2. Android(安卓)Studio添加aar依赖的两种方式
  3. 2011.07.06——— android 安装apiDemos INSTALL_FAILED_MISSING
  4. 2011.07.08(5)——— android shortcut
  5. android button 上添加图片
  6. 2011.07.08(5)——— android shortcut
  7. android 把TextView中的文字添加阴影效果
  8. android studio编译错误 之 Cause: com/android/builder/profile
  9. Android(安卓)Q 下拉状态栏快捷开关解析

随机推荐

  1. Android Environment 常量含义
  2. android textview一行显示
  3. Android 电子 罗盘 & 指南针
  4. Android(安卓)线性布局(LinearLayout)性能
  5. android > ProgressBar
  6. notification
  7. android studio 导入工程
  8. Android studio 下载地址
  9. Android Calander Event
  10. android的布局水平与垂直显示