Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Can't save an image file to the Android Photo Gallery?


Can anyone tell me why this file object doesn't save to the Android Gallery? I don't get any failures or errors, I am trying to basically copy an image in my /Resources folder across to the Gallery.

var filename = Titanium.Filesystem.resourcesDirectory + 'myimage.jpg';
var theImage = fullImage.toImage();
var file = Titanium.Filesystem.getFile(filename);
Ti.API.info('size = ' + file.size); //this works, I get a filesize outputted
Ti.API.info('name = ' + file.name); //this works
Ti.API.info('nativePath = ' + file.nativePath); //this works I get an output such as file:///android_asset/Resources/myimage.jpg

Titanium.Media.saveToPhotoGallery(file); //this doesn't work
— asked September 26th 2010 by Boydlee Pollentine
  • android
  • blob
  • file
  • gallery
  • image
  • jpg
  • photo
  • save

1 Answer

  • Accepted Answer

    It's not currently implemented see Ticket 1510 put a watch on the ticket to know when.

    — answered September 27th 2010 by Don Thorp
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.