Class Utils

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

public final class Utils extends Object
Vuzix resources class for miscellaneous utility calls
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Values defining the display type of the Vuzix device
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The Vuzix Blade hardware (does not include speakers)
    static final int
    Vuzix Blade 2
    static final int
    The Vuzix Blade Upgraded hardware with built-in speakers.
    static final int
    Vuzix M300
    static final int
    Vuzix M400
    static final int
    Vuzix M4000
    static final int
    Vuzix Shield
    static final int
    The device type cannot be determined by this SDK version
    static final int
    Deprecated. 
    static final int
    Restore the touchpad to the default state for the current hardware platform
    static final int
    Disable the touchpad (not supported by all platforms)
    static final int
    Deprecated. 
    static final int
    Enable the touchpad for gesture (key_event) input
    static final int
    Enable the touchpad for mouse pointer input
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    Returns if the touchpad can be controlled on the device
    static int
    getCurrentTouchPadState(android.content.Context context)
    Get the current touchpad mode state
    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 device
    static 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 state
    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
    static void
    setTouchpadTrackTouch(android.content.Context context, boolean trackTouch)
    Enables touchpad touch notifications This will automatically set the touchpad to TOUCHPAD_ENABLE_FOR_GESTURES.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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
    • 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 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