我有這個問題,像2周,我不知道爲什麼。我使用Ti.Paint,我想TOS保存平局到一個文件中,所以,這是代碼:鈦不能寫在Android合金文件
var paintImage=paintView.toImage().media;
var tmpImg="paintImage.jpg";;
var imageFile=Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory, tmpImg);
imageFile.write(paintImage);
沒有任何反應,什麼都沒有,動作說:「真正的」,但該文件不存在於Gallery中,也不存在於Cellphone中,也不存在於Android/data/appDirectory中,沒有任何東西,只是沒有。我不知道爲什麼。 我用這個代碼從相機保存的圖像畫廊和作品完美無瑕:
success:function(event)
{
tmpImg="prueba.jpg";
var imageFile=Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory, tmpImg);
imageFile.write(event.media);
},
因此,誰能幫助?因爲我不知道爲什麼這是行不通的。
使用
Titanium SDK 3.2.2GA with Alloy
Titanium Studio, build: 3.2.3.201404181442
MacbookPro 2012 with OSX Maverick
Device: Motorola XT910
沒有人?我需要這方面的幫助。 – Solitaryo