Is there any way to save application settings? (Titanium mobile)

You must Login before you can answer or comment on any questions.

Hi Guys,

I'm just wonder - is there any way to save application settings ? I don't mean into database. For example - in NimbleKit you can use something called NKSettings. Example:

var settings = new NKSettings();
settings.setValueForKey("UserName", "user");
var username = settings.getValueForKey("user");
Is there any similar function in Titanium mobile ?

— asked 10 months ago by Jakub Ch
0 Comments

2 Answers

Accepted Answer

Ti.App.Properties.setString('key', 'value');

and

var value = Ti.App.Properties.getString('key');

— answered 10 months ago by Alexander Bauer
answer permalink
4 Comments
  • Thanks, it works :)

    — commented 10 months ago by Jakub Ch

  • One more thing - it says:

    > The App Properties module is used for storing application-related data in property/value pairs that persist beyond application sessions and device power cycles.

    Is there any way to save the settings permanently ? I don't want to use database for this.

    — commented 10 months ago by Jakub Ch

  • Properties are saved permanently, and persist until the app is deinstalled.

    — commented 10 months ago by Alexander Bauer

  • Show 1 more comment

Your Answer

Think you can help? Login to answer this question!