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

Using file generated by Titanium.Filesystem.getFile()

$
0
0

I am using Titanium(Version: 3.4.1.201410281727) on windows 8.1 to built an android application targetingandroid OS v5.0(Debugging on Nexus 9).

I have been trying to generate some data by accelerometer and store it in a file to be exported for further use, but I am not able to locate the file on the device(Android/com.domain.app/Data/). I have already rooted my phone. Here is the piece of code I am using for writing the file.

var StringForFile = "x: " + TwistManupX + "\n" + "y: " + TwistManupY + " " + "z: " + TwistManupZ + "\n" ; var newFile = Titanium.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory,'apptext.txt'); newFile.createFile(); newFile.write(StringForFile,true); Ti.API.info('file created at '+newFile.nativepath);

Thanks!!


Viewing all articles
Browse latest Browse all 250

Latest Images

Trending Articles





Latest Images