| Platform | Since |
|---|---|
| Android | 0.1 |
| iPhone | 0.1 |
| iPad | 0.1 |
| Mobile Web | 1.8 |
The top level Platform module. The Platform module is used accessing the device's platform related functionality.
| Name | Summary |
|---|---|
| Titanium.Platform.DisplayCaps |
The Display Caps object returned by the |
| Name | Summary |
|---|---|
| addEventListener |
Adds the specified callback as an event listener for the named event. |
| canOpenURL |
returns whether or not a system URL can be opened. (iPhone, iPad, Mobile Web only.) |
| createUUID |
create a globally unique identifier |
| fireEvent |
Fires a synthesized event to any registered listeners. |
| getAddress |
Gets the value of the address property. |
| getArchitecture |
Gets the value of the architecture property. |
| getAvailableMemory |
Gets the value of the availableMemory property. |
| getBatteryLevel |
Gets the value of the batteryLevel property. |
| getBatteryMonitoring |
Gets the value of the batteryMonitoring property. |
| getBatteryState |
Gets the value of the batteryState property. |
| getDisplayCaps |
Gets the value of the displayCaps property. |
| getId |
Gets the value of the id property. |
| getLocale |
Gets the value of the locale property. |
| getMacaddress |
Gets the value of the macaddress property. |
| getModel |
Gets the value of the model property. (Android, iPhone, iPad only.) |
| getName |
Gets the value of the name property. |
| getNetmask |
Gets the value of the netmask property. |
| getOsname |
Gets the value of the osname property. |
| getOstype |
Gets the value of the ostype property. |
| getProcessorCount |
Gets the value of the processorCount property. |
| getRuntime |
Gets the value of the runtime property. |
| getUsername |
Gets the value of the username property. |
| getVersion |
Gets the value of the version property. |
| is24HourTimeFormat |
Whether device settings are set to show times in 24-hour format. (Android, iPhone, iPad only.) |
| openURL |
open a URL in the system default manner |
| removeEventListener |
Removes the specified callback as an event listener for the named event. |
| Name | Type | Summary |
|---|---|---|
| BATTERY_STATE_CHARGING | Number |
the device is plugged in and currently being charged read-only |
| BATTERY_STATE_FULL | Number |
the battery is fully charged read-only |
| BATTERY_STATE_UNKNOWN | Number |
the battery state is unknown or not monitoring is not enabled read-only |
| BATTERY_STATE_UNPLUGGED | Number |
the device is unplugged read-only |
| address | String |
the ip address that the device reports (only applicable on WIFI network) read-only |
| architecture | String |
the processor architecture that the device reports read-only |
| availableMemory | Number |
return the amount of memory available on the device in bytes read-only |
| batteryLevel | Number |
the current device battery level. this property is only accessible if |
| batteryMonitoring | Boolean |
boolean to indicate if battery monitoring is enabled read-only |
| batteryState | Number |
constant that represents the state of the battery. this property is only accessible if |
| displayCaps | Titanium.Platform.DisplayCaps |
return the DisplayCaps object for platform read-only |
| id | String |
Deprecated the unique id of the device read-only |
| locale | String |
the primary language of the device that the user has enabled read-only |
| macaddress | String |
this property will return a unique identifier for the device read-only |
| model | String |
the model of the phone that the device reports (Android, iPhone, iPad only.) read-only |
| name | String |
the name of the platform returned by the device read-only |
| netmask | String |
the network mask that the device reports (only applicable on WIFI network) read-only |
| osname | String |
the shortname of the operating system. for example, on an iPhone, will return |
| ostype | String |
the OS architecture, such as 32 bit read-only |
| processorCount | Number |
the number of processors the device reports read-only |
| runtime | String |
Short name for the JavaScript runtime in use. read-only |
| username | String |
the username of the device, if set read-only |
| version | String |
the version of the platform returned by the device read-only |
| Name | Summary |
|---|---|
| battery |
fired when the battery state changes. the battery state changes are only tracked on iPhone/iPad at 5% increments. (Android, iPhone, iPad only.) |