| Platform | Since |
|---|---|
| Android | 0.5 |
| iPhone | 0.5 |
| iPad | 0.5 |
| Mobile Web | 1.8 |
The App Properties module is used for storing application related property/value pairs which persist beyond application sessions.
In this example, we store a string property:
Titanium.App.Properties.setString("my_prop","cool");
In this example, we print out all the saved properties to the console:
var props = Titanium.App.Properties.listProperties(); for (var c=0;c<props.length;c++) { var value = Titanium.App.Properties.getString(props[c]); Titanium.API.info(props[c]+" = "+value); }
| Name | Summary |
|---|---|
| addEventListener |
Adds the specified callback as an event listener for the named event. |
| fireEvent |
Fires a synthesized event to any registered listeners. |
| getBool |
return a boolean value |
| getDouble |
return a double value |
| getInt |
return an integer value |
| getList |
return a value as an array |
| getString |
return a string value |
| hasProperty |
returns true if the property exists |
| listProperties |
return an array of property propertys |
| removeEventListener |
Removes the specified callback as an event listener for the named event. |
| removeProperty |
remove an existing property |
| setBool |
set a property as a boolean value |
| setDouble |
set a property as a double value |
| setInt |
set a property as an integer value |
| setList |
set a property as an array value |
| setString |
set a property as a string value |