Transcript
Page 1: Google Glass Fun with C#, Java and more… Getting started with Google Glass

Google Glass Fun with C#, Java and more…Getting started with Google Glass

Page 2: Google Glass Fun with C#, Java and more… Getting started with Google Glass

Introductions

Page 3: Google Glass Fun with C#, Java and more… Getting started with Google Glass

About Me

Technologist, Futurist, and Glass Explorer

Walter Quesada is a Software Engineer with over 18 years of experience architecting and developing solutions for SMB’s to Fortune 500 companies.

Currently working on proof-of-concepts for new and emerging technologies such as Google Glass and Bluetooth Low Energy applications.Find out more on his personal blog at http://qnovations.com

Walter Quesada

Enjoying some butterbeer

Page 4: Google Glass Fun with C#, Java and more… Getting started with Google Glass

About Google Glass

Overview

Google Glass is a wearable computer with an optical head-mounted display (OHMD) that is being developed by Google in the Project Glass research and development project, with a mission of producing a mass-market ubiquitous computer.

Google Glass displays information in a smartphone-like hands-free format, that can communicate with the Internet via natural language voice commands.Source: http://en.wikipedia.org/wiki/Google_Glass

Page 5: Google Glass Fun with C#, Java and more… Getting started with Google Glass

About Google Glass

Specifications

OS Android (4.0.3)

CPU OMAP 4430 SoC, dual-core

Memory 1GB RAM (682MB for developers)

Storage 16 GB Flash total (12 GB free)

Display Prism projector, 640×360 pixels (equivalent of a 25 in/64 cm screen from 8 ft/2.4 m away)

Sound Bone conduction transducer

Input Voice command through microphone, accelerometer, gyroscope, magnetometer, ambient light sensor, proximity sensor

Camera Photos - 5 MP, videos - 720p

Connectivity Wi-Fi 802.11b/g,[7] Bluetooth,[7] micro USB

Weight 50g

Source: http://en.wikipedia.org/wiki/Google_Glass

Page 6: Google Glass Fun with C#, Java and more… Getting started with Google Glass

About Google Glass

Tooling

API’s, IDE’s and more…

Mirror API (JSON, REST, OAuth) Glass Development Kit Sneak Peek (GDK,

Native) Android Developer Tools (ADT, eclipse) Android Studio (JetBrains IntelliJ IDEA) No Emulators (Some hacks out there) Screen Monitors (asm.jar, droidAtScreen.jar) Wearscript JS (http://www.wearscript.com)

Page 7: Google Glass Fun with C#, Java and more… Getting started with Google Glass

About Google Glass

Design

Source: https://developers.google.com/glass/design

A UX paradigm shift…

Learn the principles of Glass design See how the Glass UI works UI patterns Understand the Glass style Implement best practices in your

Glassware

Page 8: Google Glass Fun with C#, Java and more… Getting started with Google Glass

Glass Warning

Safety First

Be aware of your surroundings…

Driving (Accidents, Tickets)

Banned (Bars, Restaurants, Movie Theatres)

Shady characters (Mugged, Theft)

Page 9: Google Glass Fun with C#, Java and more… Getting started with Google Glass

Getting Started

Page 10: Google Glass Fun with C#, Java and more… Getting started with Google Glass

Make the Case

Convergence Age

Key points…

177 million wearables projected by 2018 (Cisco)

B2B, Industrial, Gov applications are the way to go…

Think about existing clients/employer use cases, create value…

Firefighters, Surgery, Virtual Classrooms, Airlines, what else?

Page 11: Google Glass Fun with C#, Java and more… Getting started with Google Glass

Getting Glass

Get Invited Explorer Program

$1,500 (Free Shipping)

Wait List 1 Per Order Choice of 5 colors 30 Day Refund Additional Items from $50 to $225.

Google I/O 2014 Might be available

Page 12: Google Glass Fun with C#, Java and more… Getting started with Google Glass

Getting Glass

eBay

Not recommended

Explorer Program Code $5+ for Invite Code Move fast, expires in 7 days!

Device (perfectly legal!) Over $1,500 Do your due diligence Good luck!

Page 13: Google Glass Fun with C#, Java and more… Getting started with Google Glass

Unboxing Glass

Contents

Like a opening birthday gift…

Device (headset) Twist-on Active Shade Mono Earbud Pouch Charger & Cable

Page 14: Google Glass Fun with C#, Java and more… Getting started with Google Glass

Connecting Glass

Synchronize

Downloads, USB, WiFi…

MyGlass app for Android and iOS… sorry WP

QR Code to setup Wi-Fi (if not on Android or iOS)

USB cord for loading apk’s (Turn on debugging!)

Page 15: Google Glass Fun with C#, Java and more… Getting started with Google Glass

Known Issues

BetaHighly experimental…

Bright light! (Hard to see screen in direct sun light) Overheats (Video, charging while on) API changes (getLiveCard is now createLiveCard,

etc) No Built-in Contextual Voice Commands No 3G (Tethering or Wi-Fi required) Worst Desktop Web Site browsing experience iPhone Screen Cast doesn’t support touch SDK limitations (ACTION_CALL does not work!) Google Play not available

Go to http://stackoverflow.com/questions/tagged/google-glass and https://code.google.com/p/google-glass-api/issues/list for more known issues and workarounds.

Page 16: Google Glass Fun with C#, Java and more… Getting started with Google Glass

The Fun Part!

Page 20: Google Glass Fun with C#, Java and more… Getting started with Google Glass

Touch Gestures

Source: https://developers.google.com/glass/develop/gdk/reference/com/google/android/glass/touchpad/Gesture

Enum Values

Gesture.LONG_PRESSGesture.SWIPE_DOWNGesture.SWIPE_LEFTGesture.SWIPE_RIGHTGesture.SWIPE_UPGesture.TAPGesture.THREE_LONG_PRESSGesture.THREE_TAPGesture.TWO_LONG_PRESSGesture.TWO_SWIPE_DOWNGesture.TWO_SWIPE_LEFTGesture.TWO_SWIPE_RIGHTGesture.TWO_SWIPE_UPGesture.TWO_TAP

Page 21: Google Glass Fun with C#, Java and more… Getting started with Google Glass

Voice Input

Source: https://developers.google.com/glass/develop/gdk/input/voice

ok glass

SpeechRecognizerRecognizerIntent

Page 22: Google Glass Fun with C#, Java and more… Getting started with Google Glass

Location and Sensors

Source: https://developers.google.com/glass/develop/gdk/location-sensors

LocationManager locationManager; // initialized elsewhere

// This example requests fine accuracy and requires altitude, but// these criteria could be whatever you want.Criteria criteria = new Criteria();criteria.setAccuracy(Criteria.ACCURACY_FINE);criteria.setAltitudeRequired(true);

List<String> providers = locationManager.getProviders( criteria, true /* enabledOnly */);

for (String provider : providers) { locationManager.requestLocationUpdates(provider, minTime, minDistance, listener);}

Page 23: Google Glass Fun with C#, Java and more… Getting started with Google Glass

Location and Sensors

Source: https://developers.google.com/glass/develop/gdk/location-sensors

The following Android API sensors are supported on Glass:

Sensor.TYPE_ACCELEROMETERSensor.TYPE_GRAVITYSensor.TYPE_GYROSCOPESensor.TYPE_LIGHTSensor.TYPE_LINEAR_ACCELERATIONSensor.TYPE_MAGNETIC_FIELDSensor.TYPE_ORIENTATION (Deprecated, use SensorManager.getOrientation() instead.)Sensor.TYPE_ROTATION_VECTOR

Page 24: Google Glass Fun with C#, Java and more… Getting started with Google Glass

Camera

Source: https://developers.google.com/glass/develop/gdk/location-sensors

You have two options for capturing images or video:

Calling the built-in camera activity with startActivityForResult(). Use this option when possible.

Building your own logic with the Android Camera API. Follow these guidelines if you are using this method:

Take a picture on a camera button click and a video on a long click, just like Glass does.

Indicate to the user whether a picture was taken or a video was recorded. Keep the screen on during capture.

Page 25: Google Glass Fun with C#, Java and more… Getting started with Google Glass

Camera Issues

Source: https://developers.google.com/glass/develop/gdk/location-sensors

Scrambled Embedded Preview

Camera.Parameters params = camera.getParameters();params.setPreviewFpsRange(30000, 30000);camera.setParameters(params);

Source: http://stackoverflow.com/questions/20557686/glass-camera-preview-display-is-garbled

Winky (< XE11) EyeGesture (XE12)

import com.google.android.glass.eye.EyeGestureimport com.google.android.glass.eye.EyeGestureManager

Source: https://github.com/kaze0/winkySource: http://stackoverflow.com/questions/21175631/accessing-rear-facing-camera-on-glass

Source: http://www.engadget.com/2013/05/02/google-glass-developer-eye-wink

Page 26: Google Glass Fun with C#, Java and more… Getting started with Google Glass

Developing Glass

GDK Sneak Peek

Pick one IDE!

ADT/eclipse

Android Studio

Android SDK (API 15) and GDK Sneak Peek

Page 27: Google Glass Fun with C#, Java and more… Getting started with Google Glass

GDK/ADT/eclipse Code Demo

Page 28: Google Glass Fun with C#, Java and more… Getting started with Google Glass

Developing Glass

Mirror APIJSON, REST, OAuth

Any language (C#, PHP, Node.js, VB6, etc…)

Download MirrorQuickStart .NET project

Create Google Glass Project (name, URL, etc)*

Update Models/Config.cs

Source: https://cloud.google.com/console/project

Page 29: Google Glass Fun with C#, Java and more… Getting started with Google Glass

Mirror API/VS.NET Code Demo

Page 30: Google Glass Fun with C#, Java and more… Getting started with Google Glass

Thank You!

Page 31: Google Glass Fun with C#, Java and more… Getting started with Google Glass

Resources

Download at http://qnovations.com/codecamp

This presentation and source code is available online.

Twitter: http://twitter.com/waltque LinkedIn: http://linkedin.com/in/waltq Email: [email protected]

Contact information…