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
Nested ClassesModifier and TypeClassDescriptionstatic enumValues defining the display type of the Vuzix device -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe Vuzix Blade hardware (does not include speakers)static final intVuzix Blade 2static final intThe Vuzix Blade Upgraded hardware with built-in speakers.static final intVuzix M300static final intVuzix M400static final intVuzix M4000static final intVuzix Shieldstatic final intThe device type cannot be determined by this SDK versionstatic final intDeprecated.static final intRestore the touchpad to the default state for the current hardware platformstatic final intDisable the touchpad (not supported by all platforms)static final intDeprecated.static final intEnable the touchpad for gesture (key_event) inputstatic final intEnable the touchpad for mouse pointer input -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanReturns if the touchpad can be controlled on the devicestatic intgetCurrentTouchPadState(android.content.Context context) Get the current touchpad mode statestatic Utils.DisplayTypeRetrieve 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 intRetrieve the model number for the current devicestatic booleanisInputDeviceButtons(android.view.InputEvent iEvent) Checks if an input is coming from the device's buttons (as opposed to touchpad, or speech)static booleanisInputDeviceTouchpad(android.view.InputEvent iEvent) Checks if an input is coming from the device's touchpad (as opposed to buttons, or speech)static booleansetTouchPadState(android.content.Context context, int state) Sets the touchpad control statestatic booleansetTouchPadState(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 voidsetTouchpadTrackTouch(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- See Also:
-
TOUCHPAD_DISABLE
public static final int TOUCHPAD_DISABLEDisable the touchpad (not supported by all platforms)- See Also:
-
TOUCHPAD_ENABLE_FOR_GESTURES
public static final int TOUCHPAD_ENABLE_FOR_GESTURESEnable the touchpad for gesture (key_event) input- See Also:
-
TOUCHPAD_ENABLE_FOR_MOUSE
public static final int TOUCHPAD_ENABLE_FOR_MOUSEEnable the touchpad for mouse pointer input- See Also:
-
TOUCHPAD_DEFAULT
public static final int TOUCHPAD_DEFAULTRestore the touchpad to the default state for the current hardware platform- See Also:
-
-
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
-