IBM Worklight 7.1 - Невозможно использовать локально сохраненный файл на устройстве Android, используя window.open, получая исключение как '' android.os.FileUriExposedException: " - PullRequest
0 голосов
/ 31 января 2019

IBM MFP 7.1: ошибка «android.os.FileUriExposedException:» при открытии локально сохраненного PDF-документа с помощью window.open ().

"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="."/>
...