Phonegap iOS: Save a Saved Image Together / Retrieve the Last Saved Image URI File

I am creating a Phonegap application that saves the contents of the canvas on a camera roll (I do this with Canvas2ImagePlugin), now I would like to share this saved image using the SocialSharing PhoneGap plugin, but I need to fill in the URI field of the image to use the plugin. How can i do this?

I have a saveImage () function, which pretty much does what it says: it launches the plugin, saving my canvas, to the image and warnings when the image is saved in the camera roll.

var canvas = document.getElementById("canvas");
var context = canvas.getContext("2d");

window.canvas2ImagePlugin.saveImageDataToLibrary(
    function(msg){console.log(msg);},
    function(err){console.log(err);},
    document.getElementById('canvas')
);

alert("Saved!");

I am open to other solutions for sharing (fb and twitter) the contents of my canvas. Thanks

+4
1

, , canvas2image , iOS "". Adobe Build : https://github.com/wbt11a/Canvas2ImagePlugin

, . , .

+1

Source: https://habr.com/ru/post/1530615/


All Articles