Interface EventListener


public interface EventListener
EventListeners get notified about interactions with the glasses. All methods have a default implementation that does nothing so you only need to implement the methods you care about.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    The display is turning off.
    default void
    The display is turning on.
    default void
    The displayed timed out.
    default void
    onPowerButtonPress(boolean turningOn)
    The user pressed the power button.
    default void
    onScrolled(boolean isScreenEmpty)
    The SCROLL layout has auto-scrolled one position
    default void
    onTap(int tapCount)
    User has tapped the glasses.
  • Method Details

    • onTap

      default void onTap(int tapCount)
      User has tapped the glasses. tapCount will be 1, 2 or 3 only. If the user taps more than 3 times, no taps will be reported.
      Parameters:
      tapCount - the number of taps
    • onDisplayOn

      default void onDisplayOn()
      The display is turning on. This can happen for any reason including pushing content to the display, user presses the power button, a notification coming in or an explicit call to screenOn().
    • onDisplayOff

      default void onDisplayOff()
      The display is turning off. This can happen for any reason including user presses the power button, a display timeout occurred or an explicit call to screenOff().
    • onDisplayTimeout

      default void onDisplayTimeout()
      The displayed timed out.
    • onScrolled

      default void onScrolled(boolean isScreenEmpty)
      The SCROLL layout has auto-scrolled one position
      Parameters:
      isScreenEmpty - True when the last slice has scrolled completely off the screen. False if any scrolling content is still visible.
    • onPowerButtonPress

      default void onPowerButtonPress(boolean turningOn)
      The user pressed the power button. turningOn will specify whether the display is turning on or off.
      Parameters:
      turningOn - true if the display is turning on, false if turning off