Search code examples
titaniumappceleratorappcelerator-mobile

where to store my data in appcelerator?


lets say we want to do a simple app for android and for this app we want some data. Those data when i test my example on my pc locally i have them in a file with json format. lets say that the app doesnt need an internet connection so we cant send a request to a server somewhere.

Now if i move to the android device ( in my case the titanium emulator ) i dont have a server so i can't fetch my json data file.

So whats the secret ? how am i going to do this work ? how all those native apps work with no server, no database, not a way to fetch an xml or json data file ?

thnx


Solution

  • take a look at the kitchenSink examples, specifically the FileSystem examples

    they will demonstrate how to read and write from the local filesystem of the device

    filesystem.js in KitchenSink