ionic-team / cordova-plugin-ionic-webview

Web View plugin for Cordova, specialized for Ionic apps.
Apache License 2.0
487 stars 395 forks source link

Images are not displayed when converted using the window.Ionic.WebView.convertFileSrc(filePath) #643

Open franferns opened 3 years ago

franferns commented 3 years ago

I have created a cordova app with displaying of an image stored to the phone . Below is the code I use cordova version 10.0.0 cordova-android version 9.1.0

Plugins used cordova-plugin-ionic-webview 5.0.0 "cordova-plugin-ionic-webview" cordova-plugin-whitelist 1.3.4 "Whitelist"

the index.html is as follows

image

index.js (file path exists)

image

below is the output. The image exists and i have verified by manually navigating to the file path.

image

source path for the img tag image

What else am i missing to get this to working ?

evelas commented 3 years ago

any suggestion? The same problem. @franferns hi, you solved this problem?

franferns commented 3 years ago

@evelas No, I downgraded the cordova-plugin-ionic-webview 2.5.3

evelas commented 3 years ago
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
    <application android:requestLegacyExternalStorage="true">
</edit-config>
itsonit commented 3 years ago

@evelas will break again on android 11 devices. https://stackoverflow.com/a/63365334/2797243