Chapter    10

Gesture and Voice Recognition

The primary ways of interacting with Glass are the touchpad and voice recognition. In this chapter, we’ll learn to detect gestures on the touchpad—including tapping, swiping, and long pressing—and we’ll learn several ways of leveraging voice recognition. Additionally, we’ll learn to implement a less common way of interacting with Glass, head gestures. Let’s get started.

Gestures on the Touchpad

The Android SDK supports all sorts of input devices, including touch screens and trackballs. When users interact with an input device, Android generates a series of events that describe the entire interaction at a low level. All of these events are typically passed into a callback as a MotionEvent object, which ...

Get Beginning Android Wearables now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.