SlideShare a Scribd company logo
Developing for Google Glass
February 4th 2014
Mark Billinghurst, Gun Lee
HIT Lab NZ
University of Canterbury
The Glass Class – Feb 17th – 21st

  Intensive Glass Course
  See http://arforglass.org/
Overview
 
 
 
 
 
 

Introduction to Glass
Concept Design Non-programmers
Rapid Prototyping Simple programming
Mirror API - Server Development
Native Applications - Java/Android Developers
More Resources
Introduction
Google Glass
Developing for Google Glass
Developing for Google Glass
View Through Google Glass

Always available peripheral information display
Combining computing, communications and content capture
User Interface

  dfasdf
  Hardware
  CPU TI OMAP 4430 – 1 Ghz
  16 GB SanDisk Flash,1 GB Ram
  570mAh Battery

  Input
  5 mp camera, 720p recording, microphone
  GPS, InvenSense MPU-9150 inertial sensor

  Output
  Bone conducting speaker
  640x360 micro-projector display
User Experience
  Truly Wearable Computing
  Less than 46 ounces

  Hands-free Information Access
  Voice interaction, Ego-vision camera

  Intuitive User Interface
  Touch, Gesture, Speech, Head Motion

  Access to all Google Services
  Map, Search, Location, Messaging, Email, etc
Glassware Applications
  https://glass.google.com/glassware
Concept Design Tools
Glass Sim – http://glasssim.com/

  Simulate the view through Google Glass
  Multiple card templates
Glass UI Templates
  Google Glass PSD Templates
  http://glass-ui.com/
  http://dsky9.com/glassfaq/the-google-glass-psd-template/

  UXPin Wireframing Tool
  http://uxpin.com/
Glass Application Storyboard

  http://dsky9.com/glassfaq/google-glass-storyboardtemplate-download/
Glass Application Flow
Rapid Prototyping
Processing
  Programming tool for Artists/Designers
  http://processing.org
  Easy to code, Free, Open source, Java based
  2D, 3D, audio/video support

  Processing For Android
  http://wiki.processing.org/w/Android
  Generates Glass Ready .apk file
Developing for Google Glass
Development Environment
Hello World
//called initially at the start of the Processing sketch!
void setup() {!
size(640, 360);!
background(0);!
} !
!
//called every frame to draw output!
void draw() {!
background(0);!
//draw a white text string showing Hello World!
fill(255);!
text("Hello World", 50, 50);!
}!
Demo
Hello World Image
PImage img; // Create an image variable!
!
void setup() {!
size(640, 360);!
//load the ok glass home screen image!
img = loadImage("okGlass.jpg"); // Load the image into
the program !
}!
!
void draw() {!
// Displays the image at its actual size at point (0,0)!
image(img, 0, 0);!
}!
Demo
Touch Pad Input
  Tap recognized as DPAD input
!void keyPressed() {!
!if (key == CODED){!
!
!if (keyCode == DPAD) {!
!// Do something ..!

  Java code to capture rich motion events
  import android.view.MotionEvent;!
Motion Event
//Glass Touch Events - reads from touch pad!
public boolean dispatchGenericMotionEvent(MotionEvent event) {
!
float x = event.getX(); // get x/y coords !
float y = event.getY();!
int action = event.getActionMasked(); // get code for action
!
!
switch (action) { // let us know which action code shows up
!
!case MotionEvent.ACTION_DOWN:!
!
!touchEvent = "DOWN";!
!
!fingerTouch = 1;!
!break; !
!case MotionEvent.ACTION_MOVE:!
!
!touchEvent = "MOVE";!
!
!xpos = myScreenWidth-x*touchPadScaleX;!
!
!ypos = y*touchPadScaleY;!
!break;!
Demo
Sensors
  Ketai Library for Processing
  https://code.google.com/p/ketai/

  Support all phone sensors
  GPS, Compass, Light, Camera, etc

  Include Ketai Library
  import ketai.sensors.*;!
  KetaiSensor sensor;!
Using Sensors
  Setup in Setup( ) function
  sensor = new KetaiSensor(this);!
  sensor.start();!
  sensor.list();

  Event based sensor reading
void onAccelerometerEvent(…)!
{!
accelerometer.set(x, y, z);!
}!
Sensor Demo
Other Tools
  App Inventor – visual programming for Android
  http://appinventor.mit.edu/

  Phone Gap – Android Apps using Javascript
  http://phonegap.com/

  Phone Gap for Glass
  https://github.com/brendajin/googleglass-phonegap-example

  WearScript
  Using Javascript/HTML to develop Glass Applications
  http://www.wearscript.com/
Mirror API + Glass GDK
Timeline Metaphor
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
	
Glassware Web app	

3. Insert a static card	

User sees the card
Develop with Mirror API
	
  Create a Google APIs Console project
  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
Example
Example
Example
Example
Example
	
On your Glass
GDK

  Glass Development Kit
  Android 4.0.3 ICS + 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 vs. Immersions
Live Cards
Immersions
Develop with GDK
	
  Android 4.0.3 (API 15) SDK and GDK Sneak
Peek from the Android SDK Manager.
  Project settings:
  Minimum and Target SDK Versions: 15
  Compile with: GDK Sneak Peek
  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
	
  Android App with a full-screen Activity
  Add Voice Trigger to launch
  Handle touch input
  Manipulating timeline
Example
	
  Add Voice Trigger to launch
  Add intent filter to AndroidManifest.xml
Example
	
  Add Voice Trigger to launch (continued)
  Add xml/voice_trigger.xml to res folder

  Add voice_trigger_title string resource
Example
	
  Handle touch input
Example
	
  Adding static cards to timeline
Summary
	
  Use Mirror API if you need ...

  Use GDK if you need ...

  Or use both
Resources
  Main Developer Website
  https://developers.google.com/glass/

  Glass Apps Developer Site
  http://glass-apps.org/glass-developer

  Google Glass Emulator
  http://glass-apps.org/google-glass-emulator

  AR for Glass Website
  http://www.arforglass.org/
Books
  Programming Google Glass
  Eric Redmond

  Rapid Android Development:
Build Rich, Sensor-Based
Applications with Processing
  Daniel Sauter
More Information
	
  Mark Billinghurst
  mark.billinghurst@hitlabnz.org

  Gun Lee
  gun.lee@hitlabnz.org

More Related Content

PDF
Breaking Glass: Glass development without Glass
DOC
Google glass
PDF
Google glass, All you need to know
RTF
Google glass documentation
PPTX
Google Glass
PPTX
GOOGLE GLASS
PPTX
Ppt on Google glass
PPTX
Google glass Seminar
Breaking Glass: Glass development without Glass
Google glass
Google glass, All you need to know
Google glass documentation
Google Glass
GOOGLE GLASS
Ppt on Google glass
Google glass Seminar

What's hot (20)

PPTX
Google glass.
PPTX
Google glass glasses presentation ppt
PPT
Google Glass Seminar PPT
PPTX
Google glass, A new innovation leading to new technology
PPTX
google glass,latest technology,btech seminar topic
PPTX
Seminar on google glass
PPTX
Google glass seminar presentation
PPTX
google project glass technology
PPTX
GOOGLE GLASS
PPTX
Google Glasses PPT
PDF
Google glass ppt
DOCX
Google glass abstract
PPTX
Google glass ppt
DOCX
Project glass ieee document
PPT
Google glass ppt
DOCX
Google Glass: A Futuristic Fashion Failure Gadget
PPTX
Google Glass
PPTX
GOOGLE GLASS: See the FUTURE
PPTX
Google Glass
PPSX
Google glass
Google glass.
Google glass glasses presentation ppt
Google Glass Seminar PPT
Google glass, A new innovation leading to new technology
google glass,latest technology,btech seminar topic
Seminar on google glass
Google glass seminar presentation
google project glass technology
GOOGLE GLASS
Google Glasses PPT
Google glass ppt
Google glass abstract
Google glass ppt
Project glass ieee document
Google glass ppt
Google Glass: A Futuristic Fashion Failure Gadget
Google Glass
GOOGLE GLASS: See the FUTURE
Google Glass
Google glass
Ad

Viewers also liked (20)

PPTX
Google Glass
PPTX
google glass
PDF
Google Glass and its Features
PPTX
MOT Hands-on Training Workshops
PPTX
Medical marketing Workshop 17 Maggio 2012-
PDF
Cátedra sobre emprendimiento y discapacidad.
PPT
Happy birthday ate Jac! =)
PPSX
Mays 2
PPTX
Ejemplo de trabajo Colaborativo
PDF
Twilio con2012 v2
PDF
Guia practica apafev_ac
PDF
Seminarflyer wissensmanagement mit share point
PDF
Kommunikation und PR in Brasilien: Mehr als Rio, Samba und Seleção
PDF
Hp 2100
PDF
Pepperandsalt 2011 Image Brochure
PDF
Dönüşüm Optimizasyonu Uygulamaları ve Growth Hacking - Zaliha Terk
PDF
Nscc230 lean6 cbt training_printedmaterials r4
PPTX
Chaves seccionadoras ABB sem base fusível - OT16...3150 A
DOCX
Historia de la banca en honduras
PPT
Presentación Proempleo xalapa
Google Glass
google glass
Google Glass and its Features
MOT Hands-on Training Workshops
Medical marketing Workshop 17 Maggio 2012-
Cátedra sobre emprendimiento y discapacidad.
Happy birthday ate Jac! =)
Mays 2
Ejemplo de trabajo Colaborativo
Twilio con2012 v2
Guia practica apafev_ac
Seminarflyer wissensmanagement mit share point
Kommunikation und PR in Brasilien: Mehr als Rio, Samba und Seleção
Hp 2100
Pepperandsalt 2011 Image Brochure
Dönüşüm Optimizasyonu Uygulamaları ve Growth Hacking - Zaliha Terk
Nscc230 lean6 cbt training_printedmaterials r4
Chaves seccionadoras ABB sem base fusível - OT16...3150 A
Historia de la banca en honduras
Presentación Proempleo xalapa
Ad

Similar to Developing for Google Glass (20)

PDF
The Glass Class - Tutorial1 - Introduction to Glassware Development
PPTX
Google Glasses Integration with SAP
PPT
The Glass Class: Rapid Prototyping for Wearable Computers
PPTX
Google Glass, the GDK, and HTML5
PPTX
Android Introduction on Java Forum Stuttgart 11
PPTX
HTML5 for Rich User Experience
PPT
Getting started with android dev and test perspective
PPTX
Starting Native Development on Google Glass
PPT
Creating Flash Content for Multiple Screens
DOCX
CV - Jaspreet Singh
PPT
Flash for Mobile Devices
KEY
Appcelerator iPhone/iPad Dev Con 2010 San Diego, CA
ZIP
iPhone/iPad Development with Titanium
KEY
Intro to PhoneGap
PDF
HTML5 vs Native Android: Smart Enterprises for the Future
PPTX
Android Programming made easy
PPT
PPT Companion to Android
PPT
Android Development Overview
PDF
The Glass Class - Tutorial 3 - Android and GDK
PPTX
CiklumJavaSat15112011:Andrew Mormysh-GWT features overview
The Glass Class - Tutorial1 - Introduction to Glassware Development
Google Glasses Integration with SAP
The Glass Class: Rapid Prototyping for Wearable Computers
Google Glass, the GDK, and HTML5
Android Introduction on Java Forum Stuttgart 11
HTML5 for Rich User Experience
Getting started with android dev and test perspective
Starting Native Development on Google Glass
Creating Flash Content for Multiple Screens
CV - Jaspreet Singh
Flash for Mobile Devices
Appcelerator iPhone/iPad Dev Con 2010 San Diego, CA
iPhone/iPad Development with Titanium
Intro to PhoneGap
HTML5 vs Native Android: Smart Enterprises for the Future
Android Programming made easy
PPT Companion to Android
Android Development Overview
The Glass Class - Tutorial 3 - Android and GDK
CiklumJavaSat15112011:Andrew Mormysh-GWT features overview

More from Mark Billinghurst (20)

PDF
Empathic Computing: Creating Shared Understanding
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Rapid Prototyping for XR: Lecture 6 - AI for Prototyping and Research Directi...
PDF
Rapid Prototyping for XR: Lecture 5 - Cross Platform Development
PDF
Rapid Prototyping for XR: Lecture 4 - High Level Prototyping.
PDF
Rapid Prototyping for XR: Lecture 3 - Video and Paper Prototyping
PDF
Rapid Prototyping for XR: Lecture 2 - Low Fidelity Prototyping.
PDF
Rapid Prototyping for XR: Lecture 1 Introduction to Prototyping
PDF
Research Directions in Heads-Up Computing
PDF
IVE 2024 Short Course - Lecture18- Hacking Emotions in VR Collaboration.
PDF
IVE 2024 Short Course - Lecture13 - Neurotechnology for Enhanced Interaction ...
PDF
IVE 2024 Short Course Lecture15 - Measuring Cybersickness
PDF
IVE 2024 Short Course - Lecture14 - Evaluation
PDF
IVE 2024 Short Course - Lecture12 - OpenVibe Tutorial
PDF
IVE 2024 Short Course Lecture10 - Multimodal Emotion Recognition in Conversat...
PDF
IVE 2024 Short Course Lecture 9 - Empathic Computing in VR
PDF
IVE 2024 Short Course - Lecture 8 - Electroencephalography (EEG) Basics
PDF
IVE 2024 Short Course - Lecture16- Cognixion Axon-R
PDF
IVE 2024 Short Course - Lecture 2 - Fundamentals of Perception
PDF
Research Directions for Cross Reality Interfaces
Empathic Computing: Creating Shared Understanding
Reach Out and Touch Someone: Haptics and Empathic Computing
Rapid Prototyping for XR: Lecture 6 - AI for Prototyping and Research Directi...
Rapid Prototyping for XR: Lecture 5 - Cross Platform Development
Rapid Prototyping for XR: Lecture 4 - High Level Prototyping.
Rapid Prototyping for XR: Lecture 3 - Video and Paper Prototyping
Rapid Prototyping for XR: Lecture 2 - Low Fidelity Prototyping.
Rapid Prototyping for XR: Lecture 1 Introduction to Prototyping
Research Directions in Heads-Up Computing
IVE 2024 Short Course - Lecture18- Hacking Emotions in VR Collaboration.
IVE 2024 Short Course - Lecture13 - Neurotechnology for Enhanced Interaction ...
IVE 2024 Short Course Lecture15 - Measuring Cybersickness
IVE 2024 Short Course - Lecture14 - Evaluation
IVE 2024 Short Course - Lecture12 - OpenVibe Tutorial
IVE 2024 Short Course Lecture10 - Multimodal Emotion Recognition in Conversat...
IVE 2024 Short Course Lecture 9 - Empathic Computing in VR
IVE 2024 Short Course - Lecture 8 - Electroencephalography (EEG) Basics
IVE 2024 Short Course - Lecture16- Cognixion Axon-R
IVE 2024 Short Course - Lecture 2 - Fundamentals of Perception
Research Directions for Cross Reality Interfaces

Recently uploaded (20)

PPTX
Cloud computing and distributed systems.
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Modernizing your data center with Dell and AMD
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Electronic commerce courselecture one. Pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Encapsulation theory and applications.pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Cloud computing and distributed systems.
20250228 LYD VKU AI Blended-Learning.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Unlocking AI with Model Context Protocol (MCP)
Modernizing your data center with Dell and AMD
Network Security Unit 5.pdf for BCA BBA.
Encapsulation_ Review paper, used for researhc scholars
Diabetes mellitus diagnosis method based random forest with bat algorithm
Electronic commerce courselecture one. Pdf
Understanding_Digital_Forensics_Presentation.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Encapsulation theory and applications.pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf

Developing for Google Glass

  • 1. Developing for Google Glass February 4th 2014 Mark Billinghurst, Gun Lee HIT Lab NZ University of Canterbury
  • 2. The Glass Class – Feb 17th – 21st   Intensive Glass Course   See http://arforglass.org/
  • 3. Overview             Introduction to Glass Concept Design Non-programmers Rapid Prototyping Simple programming Mirror API - Server Development Native Applications - Java/Android Developers More Resources
  • 8. View Through Google Glass Always available peripheral information display Combining computing, communications and content capture
  • 10.   Hardware   CPU TI OMAP 4430 – 1 Ghz   16 GB SanDisk Flash,1 GB Ram   570mAh Battery   Input   5 mp camera, 720p recording, microphone   GPS, InvenSense MPU-9150 inertial sensor   Output   Bone conducting speaker   640x360 micro-projector display
  • 11. User Experience   Truly Wearable Computing   Less than 46 ounces   Hands-free Information Access   Voice interaction, Ego-vision camera   Intuitive User Interface   Touch, Gesture, Speech, Head Motion   Access to all Google Services   Map, Search, Location, Messaging, Email, etc
  • 14. Glass Sim – http://glasssim.com/   Simulate the view through Google Glass   Multiple card templates
  • 15. Glass UI Templates   Google Glass PSD Templates   http://glass-ui.com/   http://dsky9.com/glassfaq/the-google-glass-psd-template/   UXPin Wireframing Tool   http://uxpin.com/
  • 16. Glass Application Storyboard   http://dsky9.com/glassfaq/google-glass-storyboardtemplate-download/
  • 19. Processing   Programming tool for Artists/Designers   http://processing.org   Easy to code, Free, Open source, Java based   2D, 3D, audio/video support   Processing For Android   http://wiki.processing.org/w/Android   Generates Glass Ready .apk file
  • 22. Hello World //called initially at the start of the Processing sketch! void setup() {! size(640, 360);! background(0);! } ! ! //called every frame to draw output! void draw() {! background(0);! //draw a white text string showing Hello World! fill(255);! text("Hello World", 50, 50);! }!
  • 23. Demo
  • 24. Hello World Image PImage img; // Create an image variable! ! void setup() {! size(640, 360);! //load the ok glass home screen image! img = loadImage("okGlass.jpg"); // Load the image into the program ! }! ! void draw() {! // Displays the image at its actual size at point (0,0)! image(img, 0, 0);! }!
  • 25. Demo
  • 26. Touch Pad Input   Tap recognized as DPAD input !void keyPressed() {! !if (key == CODED){! ! !if (keyCode == DPAD) {! !// Do something ..!   Java code to capture rich motion events   import android.view.MotionEvent;!
  • 27. Motion Event //Glass Touch Events - reads from touch pad! public boolean dispatchGenericMotionEvent(MotionEvent event) { ! float x = event.getX(); // get x/y coords ! float y = event.getY();! int action = event.getActionMasked(); // get code for action ! ! switch (action) { // let us know which action code shows up ! !case MotionEvent.ACTION_DOWN:! ! !touchEvent = "DOWN";! ! !fingerTouch = 1;! !break; ! !case MotionEvent.ACTION_MOVE:! ! !touchEvent = "MOVE";! ! !xpos = myScreenWidth-x*touchPadScaleX;! ! !ypos = y*touchPadScaleY;! !break;!
  • 28. Demo
  • 29. Sensors   Ketai Library for Processing   https://code.google.com/p/ketai/   Support all phone sensors   GPS, Compass, Light, Camera, etc   Include Ketai Library   import ketai.sensors.*;!   KetaiSensor sensor;!
  • 30. Using Sensors   Setup in Setup( ) function   sensor = new KetaiSensor(this);!   sensor.start();!   sensor.list();   Event based sensor reading void onAccelerometerEvent(…)! {! accelerometer.set(x, y, z);! }!
  • 32. Other Tools   App Inventor – visual programming for Android   http://appinventor.mit.edu/   Phone Gap – Android Apps using Javascript   http://phonegap.com/   Phone Gap for Glass   https://github.com/brendajin/googleglass-phonegap-example   WearScript   Using Javascript/HTML to develop Glass Applications   http://www.wearscript.com/
  • 33. Mirror API + Glass GDK
  • 36. 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
  • 37. 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/
  • 38. 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
  • 39. Mirror API based Web App Glassware Web app 3. Insert a static card User sees the card
  • 40. Develop with Mirror API   Create a Google APIs Console project   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
  • 46. GDK   Glass Development Kit   Android 4.0.3 ICS + Glass specific APIs   Use standard Android Development Tools
  • 47. GDK   GDK add-on features   Timeline and cards   Menu and UI   Touch pad and gesture   Media (sound, camera and voice input)
  • 48. 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
  • 49. Live Cards vs. Immersions
  • 52. Develop with GDK   Android 4.0.3 (API 15) SDK and GDK Sneak Peek from the Android SDK Manager.   Project settings:   Minimum and Target SDK Versions: 15   Compile with: GDK Sneak Peek   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
  • 53. Example   Android App with a full-screen Activity   Add Voice Trigger to launch   Handle touch input   Manipulating timeline
  • 54. Example   Add Voice Trigger to launch   Add intent filter to AndroidManifest.xml
  • 55. Example   Add Voice Trigger to launch (continued)   Add xml/voice_trigger.xml to res folder   Add voice_trigger_title string resource
  • 57. Example   Adding static cards to timeline
  • 58. Summary   Use Mirror API if you need ...   Use GDK if you need ...   Or use both
  • 59. Resources   Main Developer Website   https://developers.google.com/glass/   Glass Apps Developer Site   http://glass-apps.org/glass-developer   Google Glass Emulator   http://glass-apps.org/google-glass-emulator   AR for Glass Website   http://www.arforglass.org/
  • 60. Books   Programming Google Glass   Eric Redmond   Rapid Android Development: Build Rich, Sensor-Based Applications with Processing   Daniel Sauter
  • 61. More Information   Mark Billinghurst   mark.billinghurst@hitlabnz.org   Gun Lee   gun.lee@hitlabnz.org