using the plugin i'm trying to take photo in my app trough the camera.getPicture() method. Here is the code:
navigator.camera.getPicture(onSuccess, onFail, {
quality: 50,
destinationType: Camera.DestinationType.FILE_URI
});
According to the Cordova docs (https://cordova.apache.org/docs/en/10.x/reference/cordova-plugin-camera/index.html), the success callback should receive something like
content://media/external/images/media/2 for the file uri, however i only receive this:
file///data/user/0/com.tld.appname/cache/1642011143203.jpg.
Trying to use this value as an image src in the WebView does nothing and i'm unable to find the file within the phone filesystem (there is no file///data/user/0/com.tld.appname directory available). The phone is Samsung Galaxy S6 Edge, Android 7.0.
Other software versions:
- [email protected]
- [email protected]
- [email protected]
- Android SDK Platform 11.0 / API Level 30
What is wrong here?
When i use DATA_URL as destination, it is working fine, however the Cordova docs states this could result in memory problems.
Add this to your config so the WebView can load local files from
file://