I would like to download a file (public URL) and save it to my application directory
Titanium.Filesystem.applicationDataDirectory
Now if I would want to show that image in an ImageView what will be the path I use ?
I would like to download a file (public URL) and save it to my application directory
Titanium.Filesystem.applicationDataDirectory
Now if I would want to show that image in an ImageView what will be the path I use ?
Try this code,
var photoFile = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, <Your Image Name with .png or .jpg>);
var blobOfImage = photoFile.read();
var imageView = Titanium.UI.createImageView({
image : blobOfImage,
width : 'auto',
height : 'auto'
});
I think this is helpful for you.