I'm building an app with ionic & cordova and I have to display some images and let the user decide which to download to its device.
The code I use to save the image is the following:
this.pl.requestAuthorization().then(()=>{
this.pl.saveImage(path+"&ext=.jpg","ALBUM").then(()=>{
this.showAlert("SUCCESS","Image saved");
}).catch((err)=>{
this.showAlert("ERROR",err);
});
});
Explaination:
this.pl
is the object which refers to the PhotoGallery which is imported in the constructor
like every other "import"
this.showAlert
is just a function to alert the user
path
is the remote URL from the website i show images from, it's something like this
This code above always return error: no permission.
I already put the WRITE_EXTERNAL_STORAGE permission in the AndroidManifest.xml and also tried to ask permission from the plugin, but it didn't work anyway. While using the app, I was asked (only the first time) to acconsent to write access, but no action is ever taken.
Any help?