Search code examples
javascripthtmlsessiontitaniumhybrid

Appcelerator Titanium - Session Management


Is there any predefined method to maintain a session in Appcelerator Titanium studio. Like javascript has support session management as follows

// Storage
sessionStorage.setItem('key', 'value');

// Retrieval
var field = sessionStorage.getItem('key');

// Destroy
sessionStorage.removeItem('key');

Is there any way to use these functionality in an Appcelerator Titanium Studio?


Solution

  • There are properties in Titanium. Please have a look at it in the Documentation. The docs are pretty well laid out! (So this question shouldn't have to be asked).

    That being said, documentation about properties here

    var foo = Ti.App.Properties.getString('foo');
    

    Properties are stored cross session