Top Banner
Dinesh Ganesan GDG Baltimore V 1.0 Development – Code labs
27

Google Glass - An Intro presentation to conduct code lab events.

Jan 15, 2015

Download

Technology

getdinesh

Google Glass developer preso to conduct GDG Chapter or any other code lab events.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Google Glass - An Intro presentation to conduct code lab events.

Dinesh GanesanGDG Baltimore V 1.0

Development – Code labs

Page 2: Google Glass - An Intro presentation to conduct code lab events.

WHAT IS GLASS?

Wearable computing device that interacts with human digital information through natural language voice commands

Experience the glass. Slide# 1.

Page 3: Google Glass - An Intro presentation to conduct code lab events.

What it can do?

Slide# 2.

Page 4: Google Glass - An Intro presentation to conduct code lab events.

Slide# 3.

Integrated screen display – Semi Transparent. Camera –to capture Video/Picture. Mini-Projector – to display the visual. Hidden battery inside the frame

HOW DOES IT WORK?

Page 5: Google Glass - An Intro presentation to conduct code lab events.

Application Model.

Experience the glass.Slide# 4.

1. GDK : Similar to iOS/Android Native App

2. Mirror API: Similar to mobile web

Page 6: Google Glass - An Intro presentation to conduct code lab events.

User Experience.

Experience the timeline card. Slide# 5.

Time Location Engagement

Relevant Natural Language

Gesture

Page 7: Google Glass - An Intro presentation to conduct code lab events.

Gestures

Experience the timeline card.

Tap Wake up

Natural Language

Wink

Slide# 6.

Page 9: Google Glass - An Intro presentation to conduct code lab events.

Mirror API Dev

Quick start : Mirror API Slide# 8.

Required Tools : Cloud based Mirror APIs.

Objects Timeline Subscriptions Locations Contacts

JSON

Page 10: Google Glass - An Intro presentation to conduct code lab events.

Mirror - TestEnv

Mirror Playground Slide# 9.

Mirror Playground is the best online tool to validate the static card’s look and feel with JSON text. It has couple of pre-built templates for the beginners, and allows to create custom UI templates. All you need to do it just modify the JSON object with HTML tags.

Page 11: Google Glass - An Intro presentation to conduct code lab events.

Mirror Apps

Slide# 10.

Page 12: Google Glass - An Intro presentation to conduct code lab events.

GDK Dev : Step1

Slide#

Install Android SDK Subscribe GDK thru SDK Manager Turn on ‘Debug’ in Glass

SDK Quickstart 11

Page 14: Google Glass - An Intro presentation to conduct code lab events.

GDK Dev : Step3

Slide#

Create a new voice command. Handling Gesture event. Defining Context Menu.

GDK DemoApps 13

Page 16: Google Glass - An Intro presentation to conduct code lab events.

GDKCode SnippetsExperience Voice Command / Touch capability.

Slide# 15.

Page 17: Google Glass - An Intro presentation to conduct code lab events.

Creating ‘Compass’ project – 1/3

Step #1. Launch Android EclipseStep #2. Click File -> New -> Android ProjectStep #3. Select ‘Android Sample Project’

Step #4. Click ‘Next’Step #5. Select ‘Glass Development Kit Sneak Peek”

Step #4

Step #5

Slide# 16.

Page 18: Google Glass - An Intro presentation to conduct code lab events.

Creating ‘Compass’ project- – 2/3

Step #6. Launch Android EclipseStep #6

Yay! My 1st Glass – GDK project Created

Slide# 17.

Page 19: Google Glass - An Intro presentation to conduct code lab events.

Creating ‘Compass’ project – 3/3

Step #6. Launch Android EclipseStep #6

Yay! My 1st Glass – GDK project Created

Slide# 18

Page 20: Google Glass - An Intro presentation to conduct code lab events.

Testing ‘Compass’ project – Voice Command

“ok glass show a compass”

Slide# 19.

Page 21: Google Glass - An Intro presentation to conduct code lab events.

Testing ‘Compass’ project – Experience

Slide# 20

Page 22: Google Glass - An Intro presentation to conduct code lab events.

‘Compass’ – Functional Analysis : Voice Command

File Name : AndroidManifest.xml

Q? What does it take to implement ‘Voice command’ in my App?

1. Add an intent filter.

2. Add a string in res\values\string.xml file.

Slide# 21.

Page 23: Google Glass - An Intro presentation to conduct code lab events.

‘Compass’ – Functional Analysis : Voice Command

File Name : res/xml/compass_show.xml

3. Add a XML for voice trigger.

res/xml/<my_voice_trigger>.xml

Q? How do I change ‘show a compass’ command ?Ans : Just modify the text in string.xml, in this case, modify the value of show_compass_voice_trigger node value from ‘show a compass’ into something ‘open my compass’.

Slide# 22

Page 24: Google Glass - An Intro presentation to conduct code lab events.

Voice Command : Best Practices.

listen totake a notepost an updateshow a compassstart a runstart a bike ridefind a reciperecord a recipecheck me instart a stopwatchstart a timerstart a round of golftranslate thislearn a songtune an instrumentplay a gamestart a workout

A. Use the Google recommended action commands.

B. Use lower case alphabets

C. Use action commands/verbs

D. For apostrophe use ‘&apos’ - or avoid using it Ex. What\&apos;s on my wallet

More info >>Slide# 23

Page 25: Google Glass - An Intro presentation to conduct code lab events.

‘Compass’ – Functional Analysis : Handling Gestures

File Name : mainActivity.java

1. Create a class variable at your main activity class.

res/xml/<my_voice_trigger>.xml

Slide# 24

2. Create a gesture detector object for the activity class and assign it to the mGestureDetector variable.

Page 26: Google Glass - An Intro presentation to conduct code lab events.

‘Compass’ – Functional Analysis : Handling Gestures

File Name : mainActivity.java

3. Finally implement the handlers.

res/xml/<my_voice_trigger>.xml

Slide# 25More info >>

Page 27: Google Glass - An Intro presentation to conduct code lab events.

Thank You.Works Cited:

http://www.google.com/glass/start/

http://www.google.com/glass/start/what-it-does/

https://developers.google.com/glass/tools-downloads/playground

http://www.brillen-sehhilfen.de/en/googleglass/

@GDGBaltimore@dineshmd

Slide# 26.