The document provides an introduction to developing glassware applications using the Mirror API and Glass Development Kit (GDK). It explains that the Mirror API is used to create static timeline cards through a web-based application, while the GDK allows developing live cards and immersive Android apps that run directly on Glass. Examples of each are presented to illustrate the differences between the two approaches and how they integrate into the Glass user interface.
1. 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
2. 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
7. 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
8. 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/
9. 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
10. 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
13. 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
21. GDK
Glass Development Kit
Android 4.4.2 + Glass specific APIs
Use standard Android Development Tools
22. GDK
GDK add-on features
Timeline and cards
Menu and UI
Touch pad and gesture
Media (sound, camera and voice input)
23. 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