Class DisplayManager
- java.lang.Object
-
- com.epson.moverio.hardware.display.DisplayManager
-
public class DisplayManager extends java.lang.Object
This class controls the display installed in the Moverio. Display management acquires an instance of the DisplayManager and performs a variety of management operations.- Since:
- 1.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static int
BRIGHTNESS_MODE_AUTOMATIC
automatic brightness modestatic int
BRIGHTNESS_MODE_MANUAL
manual brightness modestatic int
DISPLAY_AUTO_SLEEP_DISABLE
Disable display auto sleepstatic int
DISPLAY_AUTO_SLEEP_ENABLE
Enable display auto sleepstatic int
DISPLAY_MODE_2D
2D display modestatic int
DISPLAY_MODE_3D
3D display modestatic int
DISPLAY_STATE_OFF
Display offstatic int
DISPLAY_STATE_ON
Display onstatic int
DISPLAY_USER_SLEEP_DISABLE
Disable display user sleepstatic int
DISPLAY_USER_SLEEP_ENABLE
Enable display user sleep If the user slepp setting enabled, it is possible to tap the headset to turn the screen on and off.
-
Constructor Summary
Constructors Constructor Description DisplayManager(android.content.Context context)
This is the DisplayManager constructor.DisplayManager(android.content.Context context, PermissionGrantResultCallback callback)
This is the DisplayManager constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Disconnect from the Moverio's display.int
getBrightness()
Acquire the display brightness for the Moverio.int
getBrightnessMode()
Get the brightness adjustment mode for the display.int
getDisplayAutoSleepEnabled()
Get enable/disable of the automatic sleep for the display.int
getDisplayMode()
Get the 2D/3D display mode for the display.int
getDisplayState()
Get the display status for the display.int
getDisplayUserSleepEnabled()
Get enable/disable of the user sleep for the display.int
getScreenHorizontalShiftStep()
Get the screen horizontal step for the display.int
getScreenHorizontalShiftStepMax()
Get the maximum value of the screen horizontal step for the display.int
getScreenHorizontalShiftStepMin()
Get the minimum value of the screen horizontal step for the display.boolean
isBrightnessModeControlSupported()
Check if it supports controlling the brightness adjustment mode.boolean
isDisplayAutoSleepEnabledControlSupported()
Check if it supports controlling the automatic sleep.boolean
isDisplayManagerSupported()
Check if the Moverio connected to the host device supports DisplayManager functions.boolean
isDisplayStateControlSupported()
Check if it supports controlling the display status.boolean
isDisplayUserSleepEnabledControlSupported()
Check if it supports controlling the user sleep.boolean
isScreenHorizontalShiftStepControlSupported()
Check if it supports controlling the screen horizontal step.void
open()
Connect to the Moverio's display.void
release()
Release resources for using Moverio display.int
setBrightness(int brightness)
Set the display brightness for the Moverio.int
setBrightnessMode(int mode)
Set the brightness adjustment mode for the display.int
setDisplayAutoSleepEnabled(int enable)
Enable/disable the automatic sleep of the display.int
setDisplayMode(int mode)
Set the 2D/3D display mode for the display.int
setDisplayState(int state)
Set the display status for the display.int
setDisplayUserSleepEnabled(int enable)
Enable/disable the user sleep of the display.int
setScreenHorizontalShiftStep(int step)
Set the screen horizontal step for the display.
-
-
-
Field Detail
-
BRIGHTNESS_MODE_MANUAL
public static final int BRIGHTNESS_MODE_MANUAL
manual brightness mode- Since:
- 1.0.0
- See Also:
- Constant Field Values
-
BRIGHTNESS_MODE_AUTOMATIC
public static final int BRIGHTNESS_MODE_AUTOMATIC
automatic brightness mode- Since:
- 1.0.0
- See Also:
- Constant Field Values
-
DISPLAY_MODE_2D
public static final int DISPLAY_MODE_2D
2D display mode- Since:
- 1.0.0
- See Also:
- Constant Field Values
-
DISPLAY_MODE_3D
public static final int DISPLAY_MODE_3D
3D display mode- Since:
- 1.0.0
- See Also:
- Constant Field Values
-
DISPLAY_STATE_ON
public static final int DISPLAY_STATE_ON
Display on- Since:
- 1.1.0
- See Also:
- Constant Field Values
-
DISPLAY_STATE_OFF
public static final int DISPLAY_STATE_OFF
Display off- Since:
- 1.1.0
- See Also:
- Constant Field Values
-
DISPLAY_AUTO_SLEEP_ENABLE
public static final int DISPLAY_AUTO_SLEEP_ENABLE
Enable display auto sleep- Since:
- 1.1.0
- See Also:
- Constant Field Values
-
DISPLAY_AUTO_SLEEP_DISABLE
public static final int DISPLAY_AUTO_SLEEP_DISABLE
Disable display auto sleep- Since:
- 1.1.0
- See Also:
- Constant Field Values
-
DISPLAY_USER_SLEEP_ENABLE
public static final int DISPLAY_USER_SLEEP_ENABLE
Enable display user sleep If the user slepp setting enabled, it is possible to tap the headset to turn the screen on and off.- Since:
- 1.1.0
- See Also:
- Constant Field Values
-
DISPLAY_USER_SLEEP_DISABLE
public static final int DISPLAY_USER_SLEEP_DISABLE
Disable display user sleep- Since:
- 1.1.0
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DisplayManager
public DisplayManager(android.content.Context context)
This is the DisplayManager constructor.- Parameters:
context
- Activity context- Since:
- 1.0.0
-
DisplayManager
public DisplayManager(android.content.Context context, PermissionGrantResultCallback callback)
This is the DisplayManager constructor.- Parameters:
context
- Activity contextcallback
- Callback of permission grant result- Since:
- 1.2.0
-
-
Method Detail
-
open
public void open() throws java.io.IOException
Connect to the Moverio's display. It is possible to perform a variety of operations by connecting to the Moverio's display.- Throws:
java.io.IOException
- Exceptions such as no connections to Moverios- Since:
- 1.0.0
-
close
public void close()
Disconnect from the Moverio's display.- Since:
- 1.0.0
-
setBrightness
public int setBrightness(int brightness)
Set the display brightness for the Moverio. Returns 0 when setting the brightness is successful and -1 when it fails.- Parameters:
brightness
- Display brightness- Returns:
- 0: success, -1: fail
- Since:
- 1.0.0
-
getBrightness
public int getBrightness()
Acquire the display brightness for the Moverio. Returns the brightness value when acquiring the brightness is successful and -1 when it fails.- Returns:
- 0 to 20: success, -1: fail
- Since:
- 1.0.0
-
setBrightnessMode
public int setBrightnessMode(int mode)
Set the brightness adjustment mode for the display. Returns 0 when setting the brightness adjustment mode is successful and -1 when it fails. If isBrightnessModeControlSupported of DisplayManager returns false, -1 is returned.- Parameters:
mode
- Brightness adjustment mode (BRIGHTNESS_MODE_MANUAL or BRIGHTNESS_MODE_AUTOMATIC)- Returns:
- 0: success, -1: fail
- Since:
- 1.0.0
-
getBrightnessMode
public int getBrightnessMode()
Get the brightness adjustment mode for the display. Returns BRIGHTNESS_MODE_MANUAL or BRIGHTNESS_MODE_AUTOMATIC when acquiring the brightness adjustment mode is successful, and returns -1 when it fails. If isBrightnessModeControlSupported of DisplayManager returns false, -1 is returned.- Returns:
- BRIGHTNESS_MODE_MANUAL or BRIGHTNESS_MODE_AUTOMATIC: success, -1: fail
- Since:
- 1.0.0
-
isBrightnessModeControlSupported
public boolean isBrightnessModeControlSupported()
Check if it supports controlling the brightness adjustment mode. Returns supports controlling the brightness adjustment mode 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
-
setDisplayMode
public int setDisplayMode(int mode)
Set the 2D/3D display mode for the display. Returns 0 when setting the 2D/3D display mode is successful and -1 when it fails.- Parameters:
mode
- 2D/3D display mode (DISPLAY_MODE_2D or DISPLAY_MODE_3D)- Returns:
- 0: success, -1: fail
- Since:
- 1.0.0
-
getDisplayMode
public int getDisplayMode()
Get the 2D/3D display mode for the display. Returns DISPLAY_MODE_2D or DISPLAY_MODE_3D when acquiring the 2D/3D display mode is successful, and returns -1 when it fails.- Returns:
- DISPLAY_MODE_2D or DISPLAY_MODE_3D: success, -1: fail
- Since:
- 1.0.0
-
setDisplayState
public int setDisplayState(int state)
Set the display status for the display. Returns 0 when setting the display status is successful and -1 when it fails. If isDisplayStateControlSupported of DisplayManager returns false, -1 is returned.- Returns:
- 0: success, -1: fail
- Since:
- 1.1.0
-
getDisplayState
public int getDisplayState()
Get the display status for the display. Returns DISPLAY_STATE_ON or DISPLAY_STATE_OFF when acquiring the display status is successful, and returns -1 when it fails. If isDisplayStateControlSupported of DisplayManager returns false, -1 is returned.- Returns:
- DISPLAY_STATE_ON or DISPLAY_STATE_OFF: success, -1: fail
- Since:
- 1.1.0
-
isDisplayStateControlSupported
public boolean isDisplayStateControlSupported()
Check if it supports controlling the display status. Returns supports controlling the display 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
-
setDisplayAutoSleepEnabled
public int setDisplayAutoSleepEnabled(int enable)
Enable/disable the automatic sleep of the display. Returns 0 when setting the automatic sleep is successful and -1 when it fails. If isDisplayAutoSleepEnabledControlSupported of DisplayManager returns false, -1 is returned.- Returns:
- 0: success, -1: fail
- Since:
- 1.1.0
-
getDisplayAutoSleepEnabled
public int getDisplayAutoSleepEnabled()
Get enable/disable of the automatic sleep for the display. Returns DISPLAY_AUTO_SLEEP_ENABLE or DISPLAY_AUTO_SLEEP_DISABLE when acquiring the automatic sleep is successful, and returns -1 when it fails. If isDisplayAutoSleepEnabledControlSupported of DisplayManager returns false, -1 is returned.- Returns:
- DISPLAY_AUTO_SLEEP_ENABLE or DISPLAY_AUTO_SLEEP_DISABLE: success, -1: fail
- Since:
- 1.1.0
-
isDisplayAutoSleepEnabledControlSupported
public boolean isDisplayAutoSleepEnabledControlSupported()
Check if it supports controlling the automatic sleep. Returns supports controlling the automatic sleep 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
-
setDisplayUserSleepEnabled
public int setDisplayUserSleepEnabled(int enable)
Enable/disable the user sleep of the display. If this setting enabled, it is possible to tap the headset to turn the screen on and off. Returns 0 when setting the automatic sleep is successful and -1 when it fails. If isDisplayAutoSleepEnabledControlSupported of DisplayManager returns false, -1 is returned.- Returns:
- 0: success, -1: fail
- Since:
- 1.1.0
-
getDisplayUserSleepEnabled
public int getDisplayUserSleepEnabled()
Get enable/disable of the user sleep for the display. Returns DISPLAY_USER_SLEEP_ENABLE or DISPLAY_USER_SLEEP_DISABLE when acquiring the user sleep is successful, and returns -1 when it fails. If isDisplayUserSleepEnabledControlSupported of DisplayManager returns false, -1 is returned.- Returns:
- DISPLAY_USER_SLEEP_ENABLE or DISPLAY_USER_SLEEP_DISABLE: success, -1: fail
- Since:
- 1.1.0
-
isDisplayUserSleepEnabledControlSupported
public boolean isDisplayUserSleepEnabledControlSupported()
Check if it supports controlling the user sleep. Returns supports controlling the automatic sleep 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
-
setScreenHorizontalShiftStep
public int setScreenHorizontalShiftStep(int step)
Set the screen horizontal step for the display. Returns 0 when setting the screen horizontal step is successful and -1 when it fails. If isScreenHorizontalShiftStepControlSupported of DisplayManager returns false, -1 is returned.- Returns:
- 0: success, -1: fail
- Since:
- 1.1.0
-
getScreenHorizontalShiftStep
public int getScreenHorizontalShiftStep()
Get the screen horizontal step for the display. Returns the screen horizontal step when acquiring the step is successful and -1 when it fails. If isScreenHorizontalShiftStepControlSupported of DisplayManager returns false, -1 is returned.- Returns:
- 0 to 36: success, -1: fail
- Since:
- 1.1.0
-
getScreenHorizontalShiftStepMin
public int getScreenHorizontalShiftStepMin()
Get the minimum value of the screen horizontal step for the display. Returns the minimum value of the screen horizontal step when acquiring the minimum value is successful and -1 when it fails. If isScreenHorizontalShiftStepControlSupported of DisplayManager returns false, -1 is returned.- Returns:
- 0: success, -1: fail
- Since:
- 1.1.0
-
getScreenHorizontalShiftStepMax
public int getScreenHorizontalShiftStepMax()
Get the maximum value of the screen horizontal step for the display. Returns the maximum value of the screen horizontal step when acquiring the maximum value is successful and -1 when it fails. If isScreenHorizontalShiftStepControlSupported of DisplayManager returns false, -1 is returned.- Returns:
- 36: success, -1: fail
- Since:
- 1.1.0
-
isScreenHorizontalShiftStepControlSupported
public boolean isScreenHorizontalShiftStepControlSupported()
Check if it supports controlling the screen horizontal step. Returns supports controlling the screen horizontal step 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 Moverio display. If you finish using display, you must execute DisplayManager#release.- Since:
- 1.0.2
-
isDisplayManagerSupported
public boolean isDisplayManagerSupported()
Check if the Moverio connected to the host device supports DisplayManager functions. Returns supports DisplayManager 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
-
-