Last Updated: February 25, 2016
·
706
· ferdy182

Make app compatible with Google Glass

Create a regular android app targeting android 4.0.3 (API 15)

Create layouts for small screens in landscape

Use fullscreen or the status bar will appear

Implement nextFocusLeft, nextFocusRight to change focus through your interface

To handle key events (touching the trackpad) you can implement onKeyDown and look for these keycodes:

KEYCODE_DPAD_CENTER (tap)

KEYCODE_TAB (horizontal swipes; isShiftPressed() returns true for backward [left] swipes and false for forward [right] swipes)

KEYCODE_CAMERA (camera button)

KEYCODE_BACK (swipe down, acts like back button)

There is no key code equivalent for a swipe up.

I am not sure yet but you can implement standard android voice commands to manage your app.