Interface DeviceService

  • All Known Implementing Classes:
    IOSDeviceService

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

    Example

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

    Android Configuration: none

    iOS Configuration: none

    Since:
    3.0.0
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      static java.util.Optional<DeviceService> create()
      Returns an instance of DeviceService.
      java.lang.String getModel()
      Returns the name of the device's model or product.
      java.lang.String getPlatform()
      Returns the platform string that the operating system uses to identify itself.
      java.lang.String getSerial()
      Returns the device hardware serial number.
      java.lang.String getUuid()
      Returns the device's universally unique identifier.
      java.lang.String getVersion()
      Returns the version number of the device platform.
      boolean isWearable()
      Returns true if the device is a wearable
    • Method Detail

      • getModel

        java.lang.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

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

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

        java.lang.String getVersion()
        Returns the version number of the device platform.
        Returns:
        The device version.
      • getSerial

        java.lang.String getSerial()
        Returns the device hardware serial number.
        Returns:
        The device serial.
      • isWearable

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