Intent intent= new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(
UtilPermissions.getFileUri(mPresenter.getView().getContext(), new File(mFileName)), "text/html");
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
mPresenter.getView().getContext().startActivity(intent);
html文件和图片存放在同一文件夹下,使用上面这段代码打开HTML,浏览器中不显示图片。
Android 7.0后对分享文件的uri做了限制导致,对于调用外部应用打开HTML会出现无法加载图片的问题