01-09-2012 11:26 PM
Intend to find a way to save acceleration into a file, but I don't know how to do it.
Does anyone know the answer or useful website or reference.
Solved! Go to Solution.
01-11-2012 05:15 AM
The main thing I have to discover to get file IO working on PlayBook (on top of knowing how to use C file functions is):
If you wish to read a file from inside your BAR package, you should prepend the following to the path:
If you wish to read or write a file to the data storage for your application, you should prepend the following to the path:
So, for example:
// Load from BAR.
LoadTexture( "./app/native/mytexture.tex" );
// Save into data directory (where we have READ/WRITE access).
SaveGame( "./data/savegame.xml" );
I have this abstracted away into my PlayBook file system (which I imagine is quite a common thing to do).
I hope that is of some help.
09-11-2012 01:24 PM
I still suffer how to write a data into Playbook storage spac.
char *outname = "file:///SDCard/documents/file.txt";
What is correct file path??
Just want to save a file into documents folder in Playbook.
09-11-2012 02:44 PM
Try to use the path.
char *outname = "./data/file.txt";
No error, but cannot file the file.txt on playbook.
Does anyone know how to reach the data file path??
09-11-2012 02:52 PM
This is the final solution.
char *outname = "./shared/documents/file.txt";
Check filesystem layout.
Thanks the reference page.
Go go drill the playbook NDK.