I am using Titanium(Version: 126.96.36.199410281727) 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);