Apache Flex 4.16.1 API Reference | All Packages | All Classes | Index | Frames No Frames |
Platform

Package | mx.utils
Class | public class Platform
Inheritance | Platform Object

Language Version : | ActionScript 3.0

Product Version : | Flex 4.12

Runtime Versions : | Flash Player 10, AIR 2.0

The Platform utility class contains several static methods to check what desktop or mobile platform the application is running on.

Public Properties

| Property | Defined By
--- | --- | ---
|  | isAir : Boolean [static] [read-only] Returns true if the application is running on a desktop AIR. | Platform
|  | isAndroid : Boolean [static] [read-only] Returns true if the application is running on Android. | Platform
|  | isBlackBerry : Boolean [static] [read-only] Returns true if the application is running on a BlackBerry. | Platform
|  | isBrowser : Boolean [static] [read-only] Returns true if the application is running in a browser. | Platform
|  | isDesktop : Boolean [static] [read-only] Returns true if the application is running on a Desktop OS. | Platform
|  | isIOS : Boolean [static] [read-only] Returns true if the application is running on IOS. | Platform
|  | isIPad : Boolean [static] [read-only] Returns true if the application is running on an iPad. | Platform
|  | isLinux : Boolean [static] [read-only] Returns true if the application is running on Linux. | Platform
|  | isMac : Boolean [static] [read-only] Returns true if the application is running on a Mac. | Platform
|  | isMobile : Boolean [static] [read-only] Returns true if the application is running on a Mobile device. | Platform
|  | isWindows : Boolean [static] [read-only] Returns true if the application is running on Windows. | Platform
|  | osVersion : String [static] [read-only] Returns the version of the OS the application is running on | Platform

Protected Properties

| Property | Defined By
--- | --- | ---
|  | _initialized : Boolean [static] | Platform
|  | _isAir : Boolean [static] | Platform
|  | _isAndroid : Boolean [static] | Platform
|  | _isBlackBerry : Boolean [static] | Platform
|  | _isBrowser : Boolean [static] | Platform
|  | _isDesktop : Boolean [static] | Platform
|  | _isIOS : Boolean [static] | Platform
|  | _isIPad : Boolean [static] | Platform
|  | _isLinux : Boolean [static] | Platform
|  | _isMac : Boolean [static] | Platform
|  | _isMobile : Boolean [static] | Platform
|  | _isWindows : Boolean [static] | Platform

Protected Methods

| Method | Defined By
--- | --- | ---
|  | getPlatforms():void [static] | Platform

Property Detail

_initialized | property

`protected static var _initialized:Boolean`

_isAir | property |

`protected static var _isAir:Boolean`

_isAndroid | property |

`protected static var _isAndroid:Boolean`

_isBlackBerry | property |

`protected static var _isBlackBerry:Boolean`

_isBrowser | property |

`protected static var _isBrowser:Boolean`

_isDesktop | property |

`protected static var _isDesktop:Boolean`

_isIOS | property |

`protected static var _isIOS:Boolean`

_isIPad | property |

`protected static var _isIPad:Boolean`

_isLinux | property |

`protected static var _isLinux:Boolean`

_isMac | property |

`protected static var _isMac:Boolean`

_isMobile | property |

`protected static var _isMobile:Boolean`

_isWindows | property |

`protected static var _isWindows:Boolean`

isAir | property |

`isAir:Boolean` [read-only]

Language Version : | ActionScript 3.0

Product Version : | Flex 4.12

Runtime Versions : | Flash Player 10, AIR 2.0

Returns true if the application is running on a desktop AIR.

Implementation
`public static function get isAir():Boolean`

isAndroid | property |

`isAndroid:Boolean` [read-only]

Language Version : | ActionScript 3.0

Product Version : | Flex 4.12

Runtime Versions : | Flash Player 10, AIR 2.0

Returns true if the application is running on Android.

Implementation
`public static function get isAndroid():Boolean`

isBlackBerry | property |

`isBlackBerry:Boolean` [read-only]

Language Version : | ActionScript 3.0

Product Version : | Flex 4.12

Runtime Versions : | Flash Player 10, AIR 2.0

Returns true if the application is running on a BlackBerry.

Implementation
`public static function get isBlackBerry():Boolean`

isBrowser | property |

`isBrowser:Boolean` [read-only]

Language Version : | ActionScript 3.0

Product Version : | Flex 4.12

Runtime Versions : | Flash Player 10, AIR 2.0

Returns true if the application is running in a browser.

Implementation
`public static function get isBrowser():Boolean`

isDesktop | property |

`isDesktop:Boolean` [read-only]

Language Version : | ActionScript 3.0

Product Version : | Flex 4.12

Runtime Versions : | Flash Player 10, AIR 2.0

Returns true if the application is running on a Desktop OS.

Implementation
`public static function get isDesktop():Boolean`

isIOS | property |

`isIOS:Boolean` [read-only]

Language Version : | ActionScript 3.0

Product Version : | Flex 4.12

Runtime Versions : | Flash Player 10, AIR 2.0

Returns true if the application is running on IOS.

Implementation
`public static function get isIOS():Boolean`

isIPad | property |

`isIPad:Boolean` [read-only]

Language Version : | ActionScript 3.0

Product Version : | Flex 4.12

Runtime Versions : | Flash Player 10, AIR 2.0

Returns true if the application is running on an iPad. Note this returns false in the AIR mobile device simulator.

Implementation
`public static function get isIPad():Boolean`

isLinux | property |

`isLinux:Boolean` [read-only]

Language Version : | ActionScript 3.0

Product Version : | Flex 4.12

Runtime Versions : | Flash Player 10, AIR 2.0

Returns true if the application is running on Linux.

Implementation
`public static function get isLinux():Boolean`

isMac | property |

`isMac:Boolean` [read-only]

Language Version : | ActionScript 3.0

Product Version : | Flex 4.12

Runtime Versions : | Flash Player 10, AIR 2.0

Returns true if the application is running on a Mac.

Implementation
`public static function get isMac():Boolean`

isMobile | property |

`isMobile:Boolean` [read-only]

Language Version : | ActionScript 3.0

Product Version : | Flex 4.12

Runtime Versions : | Flash Player 10, AIR 2.0

Returns true if the application is running on a Mobile device.

Implementation
`public static function get isMobile():Boolean`

isWindows | property |

`isWindows:Boolean` [read-only]

Language Version : | ActionScript 3.0

Product Version : | Flex 4.12

Runtime Versions : | Flash Player 10, AIR 2.0

Returns true if the application is running on Windows.

Implementation
`public static function get isWindows():Boolean`

osVersion | property |

`osVersion:String` [read-only]

Language Version : | ActionScript 3.0

Product Version : | Flex 4.13

Runtime Versions : | Flash Player 10, AIR 2.0

Returns the version of the OS the application is running on

Implementation
`public static function get osVersion():String`
Method Detail

getPlatforms | () | method

`protected static function getPlatforms():void`

Wed Nov 15 2017, 09:50 AM +01:00