DeviceInfoService
Provides static hardware and operating system information about this phone.
A singleton, accessed as DeviceInfoService(). Call init once (done by SmartPhoneClientManager.configure); after that the fields are set. Used e.g. to create the Smartphone device registration and by DeviceProbe.
It takes different hardware information from Android and iOS:
Constructors
DeviceInfoService
Properties
deviceData
The full device info for this device. See BaseDeviceInfo.data.
deviceID
Device ID.
- Android - The build ID: either a changelist number, or a label like "M4-rc20". Note that this is not unique per device.
- iOS - Unique UUID value identifying the current device.
deviceManufacturer
The manufacturer of the device.
- Android - The manufacturer of the product/hardware.
- iOS - always "Apple".
deviceModel
Device model.
- Android - The end-user-visible name for the end product.
- iOS - Device model according to OS.
deviceName
Device name.
- Android - The name of the industrial design.
- iOS < 16 user-assigned device name.
- iOS >= 16 a generic device name if project has no entitlement to get user-assigned device name.
On iOS, see more about device name.
hardware
The name of the hardware.
- Android - the name of the hardware (from the kernel command line or /proc).
- iOS - hardware type (e.g. 'iPhone7,1' for iPhone 6 Plus).
initialized
Has the device info been initialized?
operatingSystemName
The name of the current operating system. On Android this is the version codename (e.g. REL).
operatingSystemVersion
The current operating system version. On Android this is the base OS build.
platform
The platform, Android or iOS. null until init has run.
release
Release level. The user-visible version on Android (e.g. 14), the kernel version on iOS.
sdk
SDK level. The SDK int on Android, the kernel release on iOS.
Methods
init
Reads the device info using the DeviceInfoPlugin.
Does nothing if already initialized. On failure, deviceData stays empty and the other fields stay null.
toString
A string representation of this object.
Some classes have a default textual representation, often paired with a static parse function (like int.parse). These classes will provide the textual representation as their string representation.
Other classes have no meaningful textual representation that a program will care about. Such classes will typically override toString to provide useful information when inspecting the object, mainly for debugging or logging.