Hi guys,
I found the problem…
I am using system.pathForFile( “data.txt”, system.ResourceDirectory ) as such does not exist on Android. See below.
Does anybody have a suggestion for me ?
Some examples ?
Thank you !!!
http://developer.coronalabs.com/content/system-os
"Note
system.ResourceDirectory, as such, does not exist on Android. Android applications are packaged into an .apk, which is basically a ZIP file, and cannot be read as normal files. Assets fall into the following categories:
Images, which are loaded directly using native Android APIs.
Sounds, also loaded directly using native Android APIs.
Other data files that you want to access from your Corona app.
On iOS, system.pathForFile( “data.txt”, system.ResourceDirectory ) returns a path to a file in the application resource bundle. This is a directory and files in it may be read normally. On Android, however, the application is delivered in a .apk file. It is not possible to use normal file I/O to access its contents. To allow Corona apps to include generic data files on Android, system.pathForFile has an additional behavior. It copies the resource file from the ZIP archive to a private storage directory associated with the application and then returns the path to that file. Note that the storage on an actual device may be limited. You should not use this facility for large files, and if the device runs out of space, then the data copy may fail." [import]uid: 62613 topic_id: 30045 reply_id: 121203[/import]