The Glass Class:
Introduction to Glassware
Development with Mirror API & GDK
July 7th – 11th 2014
Mark Billinghurst, Gun Lee
HIT Lab NZ
University of Canterbury
An Introduction to
Glassware Development with
Mirror API & GDK
Gun Lee
* Images in the slides are from variety of sources,
including http://developer.android.com and http://developers.google.com/glass
Glassware
https://glass.google.com/glassware
Timeline Metaphor
A Card in the Timeline
Glassware and Timeline
Glassware and Timeline
Static Cards
Static content with text, HTML, images, and (link to)
video.
e.g. notification messages, news clip
Live Cards
Dynamic content updated frequently.
e.g. compass, timer
Immersions
Takes over the whole control, out from timeline.
e.g. interactive game
Glassware Development
Mirror API
Server programming, online/web application
Static cards / timeline management
GDK
Android programming, Java (+ C/C++)
Live cards & Immersions
https://developers.google.com/glass/
Mirror API
REST API
Java servlet, PHP, Go,
Python, Ruby, .NET
Timeline based apps
Static cards
- Text, HTML, media attachment (image & video)
- Standard and custom menu items
Manage timeline
- Subscribe to timeline notifications
- Sharing with contacts
- Location based services
Mirror API based Web App
3. Insert a static card
User sees the card
Glassware Web app
https://developers.google.com/glass/develop/mirror/stories
https://developers.google.com/glass/develop/mirror/stories
https://developers.google.com/glass/develop/mirror/stories
Develop with Mirror API
Create a project on Google APIs Console
Prepare a web server
https callback for OAuth 2.0
Minimum storage for credentials
Create a web application
Java servlet, PHP, Go, Python, Ruby, .NET
Implement Oauth 2.0 authentication
Use Mirror API to make REST API calls
- Wrapper classes/methods provided
Mirror API in Raw HTTP
Mirror API Java
Python
PHP
Example
Example https://hello-glass-mirror.appspot.com
Example https://hello-glass-mirror.appspot.com
Example https://hello-glass-mirror.appspot.com
Example
On your Glass
GDK
Glass Development Kit
Android 4.4.2 + Glass specific APIs
Use standard Android Development Tools
GDK
GDK add-on features
Timeline and cards
Menu and UI
Touch pad and gesture
Media (sound, camera and voice input)
Live Cards vs. Immersions
Live cards display frequently updated
information to the left of the Glass clock.
Integrate rich content into the timeline
Simple text/images to full-blown 3D graphics
Immersions let you build a user
experience outside of the timeline.
Build interactive experiences
Extra control, less user input constraints
Live Cards
Immersions
Live Cards vs. Immersions
Develop with GDK
Android 4.4.2 (API 19) GDK Preview from the
Android SDK Manager.
Project settings:
Minimum and Target SDK Versions: 19
Compile with: GDK Preview
Theme: None (allows the Glass theme to be applied.)
GDK samples
File > New Project > Android Sample Project
On Glass, turn on USB debugging
Settings > Device Info > Turn on debug
Example
Launch with voice trigger
Android App with a full-screen Activity
No theme (Glass system theme applied.)
Handle touch input
Example
Example
Summary
Use Mirror API if you need ...
Use GDK if you need ...
Or use both
More Information
Website
https://developers.google.com/glass
http://arforglass.org
http://www.hitlabnz.org
Gun Lee
Mark Billinghurst
Top Related