Developing for Google Glass

67 %
33 %
Information about Developing for Google Glass

Published on February 4, 2014

Author: marknb00



Presentation given by Mark Billinghurst and Gun Lee on how to develop for Google Glass. Given on February 4th in Christchurch New Zealand.

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

Overview             Introduction to Glass Concept Design Non-programmers Rapid Prototyping Simple programming Mirror API - Server Development Native Applications - Java/Android Developers More Resources


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 

Concept Design Tools

Glass Sim –   Simulate the view through Google Glass   Multiple card templates

Glass UI Templates   Google Glass PSD Templates     UXPin Wireframing Tool 

Glass Application Storyboard 

Glass Application Flow

Rapid Prototyping

Processing   Programming tool for Artists/Designers    Easy to code, Free, Open source, Java based   2D, 3D, audio/video support   Processing For Android    Generates Glass Ready .apk file

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);! }!


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);! }!


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;!


Sensors   Ketai Library for Processing    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    Phone Gap – Android Apps using Javascript    Phone Gap for Glass    WearScript   Using Javascript/HTML to develop Glass Applications 

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 

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 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


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    Glass Apps Developer Site    Google Glass Emulator    AR for Glass Website 

Books   Programming Google Glass   Eric Redmond   Rapid Android Development: Build Rich, Sensor-Based Applications with Processing   Daniel Sauter

More Information   Mark Billinghurst    Gun Lee 

Add a comment

Related presentations

Presentación que realice en el Evento Nacional de Gobierno Abierto, realizado los ...

In this presentation we will describe our experience developing with a highly dyna...

Presentation to the LITA Forum 7th November 2014 Albuquerque, NM

Un recorrido por los cambios que nos generará el wearabletech en el futuro

Um paralelo entre as novidades & mercado em Wearable Computing e Tecnologias Assis...

Microsoft finally joins the smartwatch and fitness tracker game by introducing the...

Related pages

Glass | Google Developers

Distributing to enterprise users? If you're developing enterprise Glassware and want to become a Glass Certifed Partner, or if you're an enterprise looking ...
Read more

Google Glass

Thanks for exploring with us. The journey doesn't end here. You’ll start to see future versions of Glass when they’re ready (for now, no peeking).
Read more

Google Glass Development Without Glass - ELEKS Labs

Here are the slides of my “Google Glass Development without Glass” presentation. As I promised, here is the follow-up blogpost with some code samples.
Read more

Designing and Developing for Google Glass Buch portofrei

Bücher bei Weltbild: Jetzt Designing and Developing for Google Glass versandkostenfrei online kaufen bei Weltbild, Ihrem Bücher-Spezialisten!
Read more

Designing and Developing for Google Glass - O'Reilly Media

Creating apps for Google Glass is more involved than simply learning how to navigate its hardware, APIs, and SDK. You also need the right mindset.
Read more

Designing and Developing for Google Glass: Thinking ...

Designing and Developing for Google Glass: Thinking Differently for a New Platform: Allen Firstenberg, Jason Salas: Fremdsprachige Bücher
Read more

Developing for Google Glass | Skills Matter Meetup

Meetup organised by Londroid: The London Android User Group, 16th July 2014, London. Join The London Android Group for an evening devoted to Google Glass!
Read more

Developing for Google Glass: Mirror API, HTML5 and how to ...

Google Glass is around the corner it’s time to prepare our services for this new device type. Reading the specs for the first time can be a little ...
Read more

GDK Quick Start | Glass | Google Developers

Google Glass list All Products. Sign in Home Guides Reference Samples Home Guides ... GDK Quick Start For Android experts;
Read more