Does anyone have problem with Base64 to gallery plugin


#1

Last time, the app was checked (around a month ago), it was working and images were saving to the iphone’s gallery. Now there weren’t any error, but then images weren’t save to the gallery. Checked images, they were fine. Location, looked fine. Does anyone else have this problem?


#2

maybe you should have a timer(timeout) function in order to pass the variable(image file uri). This has been in my case…


#3

Thank for your reply, could you explain a little more on how to use this timeout function?

function store_image (base64){
cordova.base64ToGallery(base64,“Image_”,
function(url){
console.log(“success”);
console.log(url);
},
function(error){
console.log(“error”);
});
};


#4

try to add a timeout before the cordova.base64ToGallery function and I just look at your code maybe it was deprecated… can you look for new function about base64?


#5

New function, is it something like the below code?

cordova.base64ToGallery(base64, {prefix:“img_”,mediaScanner:true},successFunc,failFunc);

It kept on crashing the app, so there is no possible way to test it. Probably there is, but I have limited knowledge on this matter. Can’t find any other codes, have I missed something?


#6

hmm do you have a permission to access images(storage) already in your app??


#7

I assumed I do, because at the beginning it asked for permission to access photo library. If it doesn’t, wouldn’t it say there is an error?

Just checked privacy setting, photos had other apps and their respected permission. The one I am working wasn’t there, also checked under the app name. Nothing on photos, does that mean I don’t have permission to use the gallery?


#8

i think yes you don’t have the permission as a cause it forces you app to crash or exit…


#9

So what is it at the beginning when it asked for permission? :disappointed_relieved:

Anyway, thank you so much, that’s really helpful. Now just need to find out why.


#10

check your app if it has permission in the device settings app… if not maybe it was the cause why your app was crashing…


#11

Finally, found what it is needed to fix this problem.

Again, Thanks @anicacute09.


#12

I’m glad that you fix it…


#13

Please Help
I am also facing the same issue…last time the code was working perfectly but Now not working…Don’t know what to do…stucked

This is my code

this.base64ToGallery.base64ToGallery(source, { prefix: '_imgx', mediaScanner: true }).then(
res => {});

#14

Any update on this me to facing the same problem