Package com.vuzix.hud.resources
Class Utils
java.lang.Object
com.vuzix.hud.resources.Utils
Vuzix resources class for miscellaneous utility calls
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Values defining the display type of the Vuzix device -
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The Vuzix Blade hardware (does not include speakers)static final int
Vuzix Blade 2static final int
The Vuzix Blade Upgraded hardware with built-in speakers.static final int
Vuzix M300static final int
Vuzix M400static final int
Vuzix M4000static final int
Vuzix Shieldstatic final int
The device type cannot be determined by this SDK versionstatic final int
Deprecated.static final int
Restore the touchpad to the default state for the current hardware platformstatic final int
Disable the touchpad (not supported by all platforms)static final int
Deprecated.static final int
Enable the touchpad for gesture (key_event) inputstatic final int
Enable the touchpad for mouse pointer input -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Returns if the touchpad can be controlled on the devicestatic int
getCurrentTouchPadState
(android.content.Context context) Get the current touchpad mode statestatic Utils.DisplayType
Retrieve the display type for the current device Based on the model of the current device, return if this display uses a transparent or occluded display.static int
Retrieve the model number for the current devicestatic boolean
isInputDeviceButtons
(android.view.InputEvent iEvent) Checks if an input is coming from the device's buttons (as opposed to touchpad, or speech)static boolean
isInputDeviceTouchpad
(android.view.InputEvent iEvent) Checks if an input is coming from the device's touchpad (as opposed to buttons, or speech)static boolean
setTouchPadState
(android.content.Context context, int state) Sets the touchpad control statestatic boolean
setTouchPadState
(android.content.Context context, int state, android.os.Bundle extras) This method should not be used by third parties Sets the touchpad control state, including additional identification information not exposed to 3rd party applicationsstatic void
setTouchpadTrackTouch
(android.content.Context context, boolean trackTouch) Enables touchpad touch notifications This will automatically set the touchpad to TOUCHPAD_ENABLE_FOR_GESTURES.
-
Field Details
-
DEVICE_MODEL_UNKOWN
Deprecated.Incorrect spelling maintained for legacy compatibility.- See Also:
-
DEVICE_MODEL_UNKNOWN
public static final int DEVICE_MODEL_UNKNOWNThe device type cannot be determined by this SDK version- See Also:
-
DEVICE_MODEL_BLADE
public static final int DEVICE_MODEL_BLADEThe Vuzix Blade hardware (does not include speakers)- See Also:
-
DEVICE_MODEL_BLADE_REV_2020
public static final int DEVICE_MODEL_BLADE_REV_2020The Vuzix Blade Upgraded hardware with built-in speakers.- See Also:
-
DEVICE_MODEL_BLADE_2
public static final int DEVICE_MODEL_BLADE_2Vuzix Blade 2- See Also:
-
DEVICE_MODEL_M300
public static final int DEVICE_MODEL_M300Vuzix M300- See Also:
-
DEVICE_MODEL_M400
public static final int DEVICE_MODEL_M400Vuzix M400- See Also:
-
DEVICE_MODEL_M4000
public static final int DEVICE_MODEL_M4000Vuzix M4000- See Also:
-
DEVICE_MODEL_SHIELD
public static final int DEVICE_MODEL_SHIELDVuzix Shield- See Also:
-
TOUCHPAD_ENABLE
Deprecated.Enable the touchpad for gestures mode -
TOUCHPAD_DISABLE
public static final int TOUCHPAD_DISABLEDisable the touchpad (not supported by all platforms) -
TOUCHPAD_ENABLE_FOR_GESTURES
public static final int TOUCHPAD_ENABLE_FOR_GESTURESEnable the touchpad for gesture (key_event) input -
TOUCHPAD_ENABLE_FOR_MOUSE
public static final int TOUCHPAD_ENABLE_FOR_MOUSEEnable the touchpad for mouse pointer input -
TOUCHPAD_DEFAULT
public static final int TOUCHPAD_DEFAULTRestore the touchpad to the default state for the current hardware platform
-
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
getDisplayType
Retrieve the display type for the current device Based on the model of the current device, return if this display uses a transparent or occluded display.- Returns:
- DisplayType
-
getModelNumber
public static int getModelNumber()Retrieve the model number for the current device
- Returns:
- int representing the model number
-
canControlTouchPad
public static boolean canControlTouchPad()Returns if the touchpad can be controlled on the device- Returns:
- boolean true if can be controlled
-
setTouchPadState
public static boolean setTouchPadState(android.content.Context context, int state) Sets the touchpad control state- Parameters:
context
- Context of callerstate
- int desired state (TOUCHPAD_DISABLE, TOUCHPAD_ENABLE_FOR_GESTURES, TOUCHPAD_ENABLE_FOR_MOUSE)- Returns:
- boolean true if can be controlled
-
setTouchPadState
public static boolean setTouchPadState(android.content.Context context, int state, android.os.Bundle extras) This method should not be used by third parties Sets the touchpad control state, including additional identification information not exposed to 3rd party applications- Parameters:
context
- Context of caller.state
- Int desired state.extras
- not exposed to third parties.- Returns:
- boolean true if can be controlled
-
setTouchpadTrackTouch
public static void setTouchpadTrackTouch(android.content.Context context, boolean trackTouch) Enables touchpad touch notifications This will automatically set the touchpad to TOUCHPAD_ENABLE_FOR_GESTURES.- Parameters:
context
- Context of callertrackTouch
- true if touch tracking should be enabled, false otherwise.
-
getCurrentTouchPadState
public static int getCurrentTouchPadState(android.content.Context context) Get the current touchpad mode state- Parameters:
context
- Context of caller- Returns:
- integer state of the touchpad interface
- See Also:
-
isInputDeviceTouchpad
public static boolean isInputDeviceTouchpad(android.view.InputEvent iEvent) Checks if an input is coming from the device's touchpad (as opposed to buttons, or speech)- Parameters:
iEvent
- The event whose origin is being verified- Returns:
- boolean true if the source is the onboard touchpad
-
isInputDeviceButtons
public static boolean isInputDeviceButtons(android.view.InputEvent iEvent) Checks if an input is coming from the device's buttons (as opposed to touchpad, or speech)- Parameters:
iEvent
- The event whose origin is being verified- Returns:
- boolean true if the source is the onboard buttons
-