Class Utils

java.lang.Object
com.vuzix.hud.resources.Utils

public final class Utils extends Object
Vuzix resources class for miscellaneous utility calls
  • Field Details

  • Constructor Details

    • Utils

      public Utils()
  • Method Details

    • getDisplayType

      public static Utils.DisplayType 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
    • getNavigationButtonType

      public static Utils.NavigationButtonType getNavigationButtonType()
      Retrieve the navigation type for the current device Based on the model of the current device, return the details regarding physical button inputs.
      Returns:
      NavigationButtonType
    • 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
    • getTouchpadType

      public static Utils.TouchpadType getTouchpadType()
      Retrieve the touchpad type for the current device Based on the model of the current device, return the details regarding physical touchpad input
      Returns:
      TouchpadType
    • setTouchPadState

      public static boolean setTouchPadState(android.content.Context context, int state)
      Sets the touchpad control state
      Parameters:
      context - Context of caller
      state - 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 caller
      trackTouch - 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