Class DeviceManager


  • public class DeviceManager
    extends java.lang.Object
    This class manage the temperature, system status of various mounted devices. In order to use functions, it is necessary to acquire instance of DeviceManager.
    Since:
    1.1.0
    • Field Detail

      • DEVICE_ID_HEADSET_DISPLAY_L

        public static final int DEVICE_ID_HEADSET_DISPLAY_L
        Device ID for the display on the left side of the headset
        Since:
        1.1.0
        See Also:
        Constant Field Values
      • DEVICE_ID_HEADSET_DISPLAY_R

        public static final int DEVICE_ID_HEADSET_DISPLAY_R
        Device ID for the display on the right side of the headset
        Since:
        1.1.0
        See Also:
        Constant Field Values
      • DEVICE_ID_HEADSET_PROCESSOR

        public static final int DEVICE_ID_HEADSET_PROCESSOR
        Device ID for the processor of the headset
        Since:
        1.1.0
        See Also:
        Constant Field Values
      • HEADSET_STATE_DISPLAYING

        public static final int HEADSET_STATE_DISPLAYING
        Headset state of "displaying"
        Since:
        1.1.0
        See Also:
        Constant Field Values
      • HEADSET_STATE_TEMPERATURE_ERROR

        public static final int HEADSET_STATE_TEMPERATURE_ERROR
        Headset state of "temperature error"
        Since:
        1.1.0
        See Also:
        Constant Field Values
      • HEADSET_STATE_UNKNOWN

        public static final int HEADSET_STATE_UNKNOWN
        Headset state of "unknown"
        Since:
        1.1.0
        See Also:
        Constant Field Values
    • Constructor Detail

      • DeviceManager

        public DeviceManager​(android.content.Context context)
        This is the DeviceManager constructor.
        Parameters:
        context - Activity context
        Since:
        1.1.0
      • DeviceManager

        public DeviceManager​(android.content.Context context,
                             PermissionGrantResultCallback callback)
        This is the DeviceManager constructor.
        Parameters:
        context - Activity context
        callback - Callback of permission grant result
        Since:
        1.1.0
    • Method Detail

      • registerHeadsetStateCallback

        public void registerHeadsetStateCallback​(HeadsetStateCallback stateCallback)
        Register an instance of HeadsetStateCallback for receiving notifications of changes in the connection status and display status of Moverio and host device. It is possible to use this method without execute DeviceManager#open. However, when the open method is not executed, HeadsetStateCallback can receive only the change in the connection state, and when the open method is executed, HeadsetStateCallback can receive the change in the connection state and the display state.
        Parameters:
        stateCallback - HeadsetStateCallback instance
        Since:
        1.1.0
      • unregisterHeadsetStateCallback

        public void unregisterHeadsetStateCallback​(HeadsetStateCallback stateCallback)
        Release the notification of the change of the connection status and display status of Moverio and host device.
        Since:
        1.1.0
      • isHeadsetAttached

        public boolean isHeadsetAttached()
        Get the connection status of Moverio and host device. It is possible to use this method without execute DeviceManager#open.
        Returns:
        true: Headset is connected, false: Headset is disconnected
        Since:
        1.1.0
      • open

        public void open()
                  throws java.io.IOException
        Connect to the Moverio. If DeviceManager#open method is executed again after the communication is established or the communication cannot be established, an exception will occur.
        Throws:
        java.io.IOException - Exceptions such as no connections to Moverios
        Since:
        1.1.0
      • close

        public void close()
        Disconnect from the Moverio.
        Since:
        1.1.0
      • getHeadsetState

        public int getHeadsetState()
        Get the headset status. Returns HEADSET_STATE_DISPLAYING or HEADSET_STATE_TEMPERATURE_ERROR when acquiring the headset status is successful, and returns -1 when it fails. If isHeadsetStateAcquisitionSupported of DeviceManager returns false, -1 is returned. // * @return HEADSET_STATE_NO_SIGNAL or HEADSET_STATE_DISPLAYING or HEADSET_STATE_DISPLAY_OFF or HEADSET_STATE_RECOVERING or HEADSET_STATE_TEMPERATURE_ERROR: success, -1: fail
        Returns:
        HEADSET_STATE_DISPLAYING or HEADSET_STATE_TEMPERATURE_ERROR: success, -1: fail
        Since:
        1.1.0
      • isHeadsetStateAcquisitionSupported

        public boolean isHeadsetStateAcquisitionSupported()
        Check if it supports controlling the headset status. Returns supports controlling the headset status when acquiring true is supported and false when it is not supported. Returns false even if MOVERIO is not connected to the host device.
        Returns:
        true: success, false: fail
        Since:
        1.1.0
      • getHeadsetSerialNumber

        public java.lang.String getHeadsetSerialNumber()
        Get the headset serial number. Returns the headset serial number string when acquiring the headset serial number string is successful, and returns null when it fails. If isHeadsetStateAcquisitionSupported of DeviceManager returns false, -1 is returned.
        Returns:
        Headset serial number string: success, null: fail
        Since:
        1.1.0
      • isHeadsetSerialNumberAcquisitionSupported

        public boolean isHeadsetSerialNumberAcquisitionSupported()
        Check if it supports controlling the headset serial number. Returns supports controlling the headset serial number when acquiring true is supported and false when it is not supported. Returns false even if MOVERIO is not connected to the host device.
        Returns:
        true: success, false: fail
        Since:
        1.1.0
      • getHeadsetProductName

        public java.lang.String getHeadsetProductName()
        Get the headset product name. Returns the headset product name string when acquiring the headset product name string is successful, and returns null when it fails.
        Returns:
        Headset product name string: success, null: fail
        Since:
        1.1.0
      • getHeadsetSystemVersion

        public java.lang.String getHeadsetSystemVersion()
        Get the headset system version code. Returns the headset system version string when acquiring the headset system version string is successful, and returns null when it fails.
        Returns:
        Headset system version string: success, null: fail
        Since:
        1.1.0
      • getDeviceTemperature

        public float getDeviceTemperature​(int deviceId)
        Get the device temperature. Returns the device temperature when acquiring the device temperature is successful and -1 when it fails. If isDeviceTemperatureAcquisitionSupported of DeviceManager returns false, -1 is returned.
        Returns:
        0 ~ 256 : success, -1: fail
        Since:
        1.1.0
      • isDeviceTemperatureAcquisitionSupported

        public boolean isDeviceTemperatureAcquisitionSupported()
        Check if it supports controlling the device temperature. Returns supports controlling the device temperature when acquiring true is supported and false when it is not supported. Returns false even if MOVERIO is not connected to the host device.
        Returns:
        true: success, false: fail
        Since:
        1.1.0
      • release

        public void release()
        Release resources for using DeviceManager. If you finish using DeviceManager, you must execute DeviceManager#release.
        Since:
        1.1.0
      • isDeviceManagerSupported

        public boolean isDeviceManagerSupported()
        Check if the MOVERIO connected to the host device supports DeviceManager functions. Returns supports DeviceManager when acquiring true is supported and false when it is not supported. Returns false even if MOVERIO is not connected to the host device.
        Returns:
        true: success, false: fail
        Since:
        1.1.0