Interface DeviceService

All Known Implementing Classes:
AndroidDeviceService, IOSDeviceService

public interface DeviceService
The device service provides generic properties of the device on which the application is running.

Example

 DeviceService.create().ifPresent(service -> {
      System.out.printf("Device Model Name: %s", service.getModel());
  });

Android Configuration: none

iOS Configuration: none

Since:
3.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns an instance of DeviceService.
    Returns the name of the device's model or product.
    Returns the platform string that the operating system uses to identify itself.
    Returns the device's universally unique identifier.
    Returns the version number of the device platform.
    boolean
    Returns true if the device is a wearable
  • Method Details

    • create

      static Optional<DeviceService> create()
      Returns an instance of DeviceService.
      Returns:
      An instance of DeviceService.
    • getModel

      String getModel()
      Returns the name of the device's model or product. The value is set by the device manufacturer and may be different across versions of the same product.
      Returns:
      The device model.
    • getUuid

      String getUuid()
      Returns the device's universally unique identifier.
      Returns:
      The device UUID.
    • getPlatform

      String getPlatform()
      Returns the platform string that the operating system uses to identify itself.
      Returns:
      The device platform.
    • getVersion

      String getVersion()
      Returns the version number of the device platform.
      Returns:
      The device version.
    • isWearable

      boolean isWearable()
      Returns true if the device is a wearable
      Returns:
      true if the device is a wearable
      Since:
      3.3.0