Platform
Example
Reference
Properties
constants
React TSX
static constants: PlatformConstants;
Returns an object which contains all available common and specific constants related to the platform.
Properties:
Name | Type | Optional | Description |
|---|---|---|---|
| isDisableAnimations | boolean | Yes | Whether animations should be disabled. When not set, defaults to the value of isTesting. |
| isTesting | boolean | No | |
| reactNativeVersion | object | No | Information about React Native version. Keys are major, minor, patch with optional prerelease and values are numbers. |
| Version Android | number | No | OS version constant specific to Android. |
| Release Android | string | No | |
| Serial Android | string | No | Hardware serial number of an Android device. |
| Fingerprint Android | string | No | A string that uniquely identifies the build. |
| Model Android | string | No | The end-user-visible name for the Android device. |
| Brand Android | string | No | The consumer-visible brand with which the product/hardware will be associated. |
| Manufacturer Android | string | No | The manufacturer of the Android device. |
| ServerHost Android | string | Yes | |
| uiMode Android | string | No | Possible values are: 'car', 'desk', 'normal','tv', 'watch' and 'unknown'. Read more about Android ModeType. |
| forceTouchAvailable iOS | boolean | No | Indicate the availability of 3D Touch on a device. |
| interfaceIdiom iOS | string | No | The interface type for the device. Read more about UIUserInterfaceIdiom. |
| osVersion iOS | string | No | OS version constant specific to iOS. |
| systemName iOS | string | No | OS name constant specific to iOS. |
isDisableAnimations
React TSX
static isDisableAnimations: boolean;
Returns true when animations are turned off, usually during automated tests. Falls back to isTesting if not set. On Android, it can be set with the IS_DISABLE_ANIMATIONS system property.
| Type |
|---|
| boolean |
isPad iOS
React TSX
static isPad: boolean;
Returns a boolean which defines if device is an iPad.
| Type |
|---|
| boolean |
isTV
React TSX
static isTV: boolean;
Returns a boolean which defines if device is a TV.