Sun, 23 May 2021 08:22:51 GMT
Join the conversation at slack.cordova.io
Sat, 22 May 2021 11:14:54 GMT
@shashank283 says
Raised a merge request for
cordova-plugin-device
about the behaviour change indevice.uuid
for Android 8.0 or higher https://github.com/apache/cordova-plugin-device/pull/138/files
Sat, 22 May 2021 15:57:14 GMT
@sdemir says
Hello there,
I am using the “cordova-plugin-camera” plugin. Version “5.0.2”. The platform is “android”.
I choose the media with the “getPicture” method and get the media path. Then I read the file from the relevant directory. If the media is on an external disk, there is no problem. But there is a problem with the internal disk.
The media path for the internal disk is returned incorrectly. The media in this directory cannot be read with FileReader.
External disk. It works.
Returning from method "getPicture" *: "<content://com.android.externalstorage.documents/document/0E15-0403%3APictures%2FResimler%2FIMG_20210518_113902.jpg>"*
Resolved : *"<cdvfile://localhost/content/com.android.externalstorage.documents/document/0E15-0403%3APictures%2FResimler%2FIMG_20210518_113902.jpg>"*
Internal disk does not work.
Returning from method "getPicture" *: "file:///storage/emulated/0/Pictures/IMG_20210521_003037.jpg"*
Resolved : *"<cdvfile://localhost/sdcard/Pictures/IMG_20210521_003037.jpg>"*
window.resolveLocalFileSystemURL(path, function(fileEntry) { fileEntry.file(function(file) { reader = new FileReader(); reader.onloadend = function() { var fileBase64 = this.result; }; reader.readAsDataURL(file); }, function(error) { }); }, function(error) { }); }, function(error) { }, { destinationType: Camera.DestinationType.FILE_URI, sourceType: Camera.PictureSourceType.PHOTOLIBRARY, mediaType: Camera.MediaType.ALLMEDIA });``` Can you help me? Thank you, good work.