IBM MFP 7.1:使用window.open()打开本地保存的PDF文档时,出现错误“ android.os.FileUriExposedException:”。
"file:///storage/emulated/0/Android/data/com.trib.devicebee.oqic/files/healthcard_13.pdf";*
window.open(outputPath, "_system", "location=yes,hidden=no,closebuttoncaption=Close");
已在下面将其添加到AndroidManifest.xml中:
<provider android:authorities="com.sample.provider" android:exported="false" android:grantUriPermissions="true" android:name="android.support.v4.content.FileProvider">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/provider_paths"/>
</provider>
创建了Provide_paths.xml:
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-path name="external_files" path="."/>