Search code examples
titaniumappceleratordata-storageappcelerator-mobile

How to save data or a set of lists in the application using titanium?


i'm trying to save a list of data into the application wen ever i want to save a list that has come from internet.

i'm not saying like a bookmark

it's like keeping or saving all the lists that i want, into the phone for future reference which doesnt need any internet connection then

in short if you have any idea about android, it's like i want to implement shared preference in titanium.

Please help

Thank you.


Solution

  • http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.App.Properties-module

    list = ['one', 'two', 'three'];
    
    Titanium.App.Properties.setList('propertyList', list);
    
    Titanium.App.Properties.getList('propetyList');
    

    Ti.App.Properties exist beyond application sessions.