| 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 to access 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 the system is configured with a default application to handle this URL's protocol. (iPhone, iPad, Mobile Web only.) |
| createUUID |
Creates 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 |
Returns whether the system settings are configured to show times in 24-hour format. (Android, iPhone, iPad only.) |
| openURL |
Opens this URL using the system's default application for its protocol. |
| removeEventListener |
Removes the specified callback as an event listener for the named event. |
| Name | Type | Summary |
|---|---|---|
| BATTERY_STATE_CHARGING | Number |
Constant to indicate that the system is plugged in and currently being charged. read-only |
| BATTERY_STATE_FULL | Number |
Constant to indicate that the battery is fully charged. read-only |
| BATTERY_STATE_UNKNOWN | Number |
Constant to indicate that the battery state is not known or monitoring is disabled. read-only |
| BATTERY_STATE_UNPLUGGED | Number |
Constant to indicate that the system is unplugged. read-only |
| address | String |
The system's WIFI IP address. No other network types are supported. read-only |
| architecture | String |
The system's processor architecture. read-only |
| availableMemory | Number |
The system's unused memory, measured in megabytes on iOS and bytes on Android. read-only |
| batteryLevel | Number |
The battery level in percent, accessible only when |
| batteryMonitoring | Boolean |
Indicates whether battery monitoring is enabled. read-only |
| batteryState | Number |
Constant to indicate the state of the battery, accessible only when
|
| displayCaps | Titanium.Platform.DisplayCaps |
Returns the DisplayCaps object. read-only |
| id | String |
Deprecated The system's globally-unique ID (UUID). read-only |
| locale | String |
The system's default language. read-only |
| macaddress | String |
The system's network interface mac address. read-only |
| model | String |
The model of the device. (Android, iPhone, iPad only.) read-only |
| name | String |
The name of the platform. read-only |
| netmask | String |
The system's WIFI network mask. No other network types are supported. read-only |
| osname | String |
The short name of the system's Operating System. For example, iPhone
will return |
| ostype | String |
The Operating System architecture. On Android, this is |
| processorCount | Number |
The number of processing cores. read-only |
| runtime | String |
The short name of the JavaScript runtime in use. read-only |
| username | String |
The system name, if set. On iOS, this can be found in Settings > General > About > Name. read-only |
| version | String |
The system's OS version. read-only |
| Name | Summary |
|---|---|
| battery |
Fired when the battery state changes. This is measured in 5% increments on iPhone/iPad. (Android, iPhone, iPad only.) |