I am updating my android app from version 29 to 31, but i am having issues with selecting photos from the gallery. Making a new picture with the camera works fine.
Versions:
"@nativescript/core": "^7.1.3",
"@nativescript/imagepicker": "^1.0.9",
this.imagePicker
.authorize()
.then(() => this.imagePicker.present())
.then((selection) => {
console.log("selection done")
selection.forEach((selected) => {
console.log("selected: " + JSON.stringify(selected))
})
this.addPhoto(imageAsset);
})
.catch((e) => {
console.log("throwing expcetion")
// tslint:disable-next-line: no-console
console.log(e);
});
After selecting the file i get this url:
"content://com.android.providers.media.documents/document/image%3A62"
The addPhoto function puts the imageAsset in a array which is read on the HTML template and put in an image source to show it on screen.
But after I try to put in in the image tag on the HTML the following error occurs:
Error in downloadBitmap - java.net.MalformedURLException: unknown protocol: content
Someone has any idea to fix it?
I have tried every single answer i found on google and other resources.