i have this problem like 2 weeks and i don't know why. I'm using Ti.Paint and i want tos save the draw into a file, so, this is the code:
var paintImage=paintView.toImage().media;
var tmpImg="paintImage.jpg";;
var imageFile=Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory, tmpImg);
imageFile.write(paintImage);
And NOTHING happens, nothing at all, the action says "true", but the file does not exist in the Gallery, nor the Cellphone, nor the Android/data/appDirectory, nothing, just nothing. And i don't know why. I use this code to save an image from the camera to the gallery and works flawless:
success:function(event)
{
tmpImg="prueba.jpg";
var imageFile=Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory, tmpImg);
imageFile.write(event.media);
},
So, can anyone help?, because i have NO idea why this is not working.
Using
Titanium SDK 3.2.2GA with Alloy
Titanium Studio, build: 3.2.3.201404181442
MacbookPro 2012 with OSX Maverick
Device: Motorola XT910