Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (android)
Viewing all articles
Browse latest Browse all 7655

Save images in android

$
0
0

Application type:mobile,Titanium Sdk:3.3.0 GA,OS:Mac OSX,platform:Android

I am displaying these images in tableview.I want to save images to gallery.1st image is saved properly if I save the 2nd image only 2 nd image is shown 1st image is not displaying. How to create a folder and save all the files.

var img = Ti.UI.createImageView({
    image : "url/" + win.id + "&photo_name=" + json.photo_list[i].photo,
});
var blobObj = img.toImage();
var f = Ti.Filesystem.getFile(Ti.Filesystem.externalStorageDirectory, 'album[win.id].png');
    f.write(blobObj.media);
    Ti.Media.Android.scanMediaFiles([f.nativePath], null, function(e) {
});
alert('image saved');

Viewing all articles
Browse latest Browse all 7655

Trending Articles



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