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.
Written by Fernando F. Gallego
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Android
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#