Platform
Description
Query and control platform-specific state.
API overview
Constructor
Platform
()
Functions
Public functions
| forceDPI ( value: Number ): Void |
static native Override the DPI reported by getDPI; this persists across restarts |
| getDPI (): Number |
static native Return a best guess for the DPI of the current display |
| getEpochTime (): Number |
static native Return the time in seconds since the Unix epoch |
| getPlatform (): PlatformType |
static native Get the platform which we are currently running on |
| getProfile (): DisplayProfile |
static native Get the device category which we are currently running on |
| getTime (): Number |
static native Return the current time in milliseconds since application start |
| isForcingDPI (): Boolean | static native |
| openURL ( url: String ): Boolean |
static native Opens the provided URL in the default system browser |
| sleep ( sleepTime: Number ): Void |
static native Make the system sleep for the input number of milliseconds |
Constructor
Platform ()
Functions
forceDPI ( value: Number ): Void
static native
Override the DPI reported by getDPI; this persists across restarts.
Parameters
| value: Number |
getFullTypeName
(): String
Inherited from Object
native
Gets the fully qualified type name of the Object. The fully qualified type name includes the package of the type.
Returns
| String | fully qualified type name of the Object. |
getPlatform (): PlatformType
static native
Get the platform which we are currently running on.
See also:
system.platform.PlatformType
getProfile (): DisplayProfile
static native
Get the device category which we are currently running on. This is the size of the screen, not pixel density - see getDPI() for that.
See also:
system.platform.DisplayProfile
getType
(): Type
Inherited from Object
native
Gets the Type that describes the Object.
Returns
| Type | The Type that describes the object. |
getTypeName
(): String
Inherited from Object
native
Gets the type name of the Object.
Returns
| String | type name of the Object. |
openURL ( url: String ): Boolean
static native
Opens the provided URL in the default system browser.
Returns true if opened successfully.
Parameters
| url: String |