Good to hear, thiagojabur! I'll update the extension using this code. I currently can't test on a mobile device, so would it be alright if PM you when it's ready for testing?
Just for clarification, the files from /stencylworks/games/your_game /extras are stored in the compiled game in the folder /assets/data, at least on Flash/Desktop. Is this the case on Android as well?
Also, would you be able to figure it out for iOS?
Sure, you can PM me!
The problem with Android is that your apk is like a compressed directory, so, you don't have (direct) access to the directories structure. I'm not even sure that there will be a /assets/data
inside your apk, since it is like a blackbox.
However, you can build up that file structure (/assets/data
) by using the methods SystemPath.applicationStorageDirectory and SystemPath.userDirectory. Those folders will be created outside of your apk and you can read/write stuff there. The good thing about those two methods is that they actually work on Windows and iOS! Since they give you a relative path to a place where you can read/write stuff, you can build up your extension around those two methods.
Lets take Android for example. Lets assume that our app ID is com.potato.potatogame. Using SystemPath.userDirectory will give you access to the folder /Android/data/com.potato.potatogame
. There you can then create /assets/data
and store content there.