I’m using Titanium to develop an Android app.
I have a nested list of data that I’m currently storing in memory upon application startup, with Titanium.App.Properties.setList. I know I can encode this with JSON and store it on the phone, instead of memory. Then I can access it only when I need it.
But, where do I store this JSON and how do I access it? I need “random access”, since multiple places access the data.
The data is readonly.
Ti.App.Properties is a persistent store. You only need to write to it when your object changes, not every startup. It is not an in memory store. Further, JSON is a string. So store it with Ti.App.Properties.setString.