Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

save image at gallery

$
0
0

what the issue at that code at android i want to save image at gallery

var img = $.photo_container.toImage().media;
 
            fileToShare = Titanium.Filesystem.getFile(Titanium.Filesystem.externalStorageDirectory, 'lactacyd_image' + moment() + '.jpg');
            fileToShare.write(img);
            Titanium.Media.saveToPhotoGallery(fileToShare.write(img),{
success: function(e) {
    Titanium.UI.createAlertDialog({
        title:'Photo Gallery',
        message:'Image Saved Successfully'
    }).show();      
},
error: function(e) {
    Titanium.UI.createAlertDialog({
        title:'Error saving',
        message:e.error
    }).show();

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>