OpenFL – cross-platform persistent storage (databases)?

186 views
Skip to first unread message

mdr....@gmail.com

unread,
Feb 15, 2015, 3:57:22 PM2/15/15
to haxe...@googlegroups.com
Suppose an haxe+OpenFL app running on "iOS or Android or HTML5" wanted to store information locally for off-line use.  How would this be done?  Tutorials?

Confidant

unread,
Feb 16, 2015, 7:14:27 AM2/16/15
to haxe...@googlegroups.com
Have you looked at CastleDB? Or perhaps you could try Web Storage or Web Database
…not sure how available those are for native-compiled apps.

Nathan Hüsken

unread,
Feb 18, 2015, 6:58:59 AM2/18/15
to haxe...@googlegroups.com
I am also not sure, but what about: flash.net.SharedObject?
That works for me. But only for config variables, no big database thing.

On 16.02.2015 13:14, Confidant wrote:
> Have you looked at CastleDB <http://castledb.org/>? Or perhaps you could
> try Web Storage <http://www.w3.org/TR/webstorage/> or Web Database
> <http://www.w3.org/TR/webdatabase/>
signature.asc

Damion Murray

unread,
Feb 22, 2015, 10:54:05 AM2/22/15
to haxe...@googlegroups.com
For local/offline storage you can store your data as JSON files in your assets folder and load them up as needed using the Assets API (via the getText method) and then parsing the text using the JSON API. If you want cloud storage you'll have to either setup you're own database server or use a service.

Confidant

unread,
Feb 22, 2015, 11:30:28 PM2/22/15
to haxe...@googlegroups.com
That sounds very reasonable. I often create an XML file that serves a similar function.
Reply all
Reply to author
Forward
0 new messages