basics of the google glass programming
DESCRIPTION
TRANSCRIPT
![Page 1: Basics of the Google Glass programming](https://reader034.vdocuments.site/reader034/viewer/2022042623/53fa3e188d7f72b82e8b4e3d/html5/thumbnails/1.jpg)
Basic of the Google Glass programming
April 7, 2014Miki YutaniStrategic Technology Center, TIS Inc.
![Page 2: Basics of the Google Glass programming](https://reader034.vdocuments.site/reader034/viewer/2022042623/53fa3e188d7f72b82e8b4e3d/html5/thumbnails/2.jpg)
2
What is Google Glass?
![Page 3: Basics of the Google Glass programming](https://reader034.vdocuments.site/reader034/viewer/2022042623/53fa3e188d7f72b82e8b4e3d/html5/thumbnails/3.jpg)
3
Basic operations
Power button (rear)
![Page 4: Basics of the Google Glass programming](https://reader034.vdocuments.site/reader034/viewer/2022042623/53fa3e188d7f72b82e8b4e3d/html5/thumbnails/4.jpg)
4
Basic operations
Touchpad
![Page 5: Basics of the Google Glass programming](https://reader034.vdocuments.site/reader034/viewer/2022042623/53fa3e188d7f72b82e8b4e3d/html5/thumbnails/5.jpg)
5
Basic operations
Tap on touchpad
![Page 6: Basics of the Google Glass programming](https://reader034.vdocuments.site/reader034/viewer/2022042623/53fa3e188d7f72b82e8b4e3d/html5/thumbnails/6.jpg)
6
Basic operations
Swipe (forward)
![Page 7: Basics of the Google Glass programming](https://reader034.vdocuments.site/reader034/viewer/2022042623/53fa3e188d7f72b82e8b4e3d/html5/thumbnails/7.jpg)
7
Basic operations
Swipe (backward)
![Page 8: Basics of the Google Glass programming](https://reader034.vdocuments.site/reader034/viewer/2022042623/53fa3e188d7f72b82e8b4e3d/html5/thumbnails/8.jpg)
8
Basic operations
Cancel or break out
![Page 9: Basics of the Google Glass programming](https://reader034.vdocuments.site/reader034/viewer/2022042623/53fa3e188d7f72b82e8b4e3d/html5/thumbnails/9.jpg)
9
Basic operations
Voicecommand
![Page 10: Basics of the Google Glass programming](https://reader034.vdocuments.site/reader034/viewer/2022042623/53fa3e188d7f72b82e8b4e3d/html5/thumbnails/10.jpg)
10
Basic operations
Wink
![Page 11: Basics of the Google Glass programming](https://reader034.vdocuments.site/reader034/viewer/2022042623/53fa3e188d7f72b82e8b4e3d/html5/thumbnails/11.jpg)
11
Basic operations
Head detection
![Page 12: Basics of the Google Glass programming](https://reader034.vdocuments.site/reader034/viewer/2022042623/53fa3e188d7f72b82e8b4e3d/html5/thumbnails/12.jpg)
12
Home Screen
Voice command(or tap …)
![Page 13: Basics of the Google Glass programming](https://reader034.vdocuments.site/reader034/viewer/2022042623/53fa3e188d7f72b82e8b4e3d/html5/thumbnails/13.jpg)
13
Home Screen
Forward Backward
![Page 14: Basics of the Google Glass programming](https://reader034.vdocuments.site/reader034/viewer/2022042623/53fa3e188d7f72b82e8b4e3d/html5/thumbnails/14.jpg)
14
Timeline
Forward Backward
Cards
TimelineTap orvoice command
Details or option menu
![Page 15: Basics of the Google Glass programming](https://reader034.vdocuments.site/reader034/viewer/2022042623/53fa3e188d7f72b82e8b4e3d/html5/thumbnails/15.jpg)
15
Getting started with google glass
your Google+ and gmail account Setup wifi
https://glass.google.com/setup
Take a picture by glass
![Page 16: Basics of the Google Glass programming](https://reader034.vdocuments.site/reader034/viewer/2022042623/53fa3e188d7f72b82e8b4e3d/html5/thumbnails/16.jpg)
16
Getting started with google glass
MyGlass https://play.google.com/store/apps/details?
id=com.google.glass.companion
How to install the application in JapanDownload com.google.glass.companion.apk
from http://apps.evozi.com/apk-downloader/Install apk in your tablet directly
adb install -r com.google.glass.companion.apk
Pair your glass and myglass application
![Page 17: Basics of the Google Glass programming](https://reader034.vdocuments.site/reader034/viewer/2022042623/53fa3e188d7f72b82e8b4e3d/html5/thumbnails/17.jpg)
17
Glass application
Two API options of glass application Mirror API
Google API: https://code.google.com/apis/console/
Platform independentCommon infrastructureBuilt-in functionality
Glass Development Kit (GDK)Android SDKReal-time user interactionOffline functionalityAccess to hardware
![Page 18: Basics of the Google Glass programming](https://reader034.vdocuments.site/reader034/viewer/2022042623/53fa3e188d7f72b82e8b4e3d/html5/thumbnails/18.jpg)
18
Mirror API
![Page 19: Basics of the Google Glass programming](https://reader034.vdocuments.site/reader034/viewer/2022042623/53fa3e188d7f72b82e8b4e3d/html5/thumbnails/19.jpg)
19
Mirror API
www.googleapis.com
My web site
accounts.google.com
2.OAuth
4.Post (json)
5.Notification
3.Authenticate
1.Operate
![Page 20: Basics of the Google Glass programming](https://reader034.vdocuments.site/reader034/viewer/2022042623/53fa3e188d7f72b82e8b4e3d/html5/thumbnails/20.jpg)
20
Mirror API
var params = {};
params.text = 'Hello, I am a Mirror API.';
params.notification = {};
params.notification.level = 'DEFAULT';
var data = JSON.stringify(params);
var options = {
host: 'www.googleapis.com',
path: '/mirror/v1/timeline',
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Content-Length': data.length,
'Authorization': 'Bearer ' + token
}
}
![Page 21: Basics of the Google Glass programming](https://reader034.vdocuments.site/reader034/viewer/2022042623/53fa3e188d7f72b82e8b4e3d/html5/thumbnails/21.jpg)
21
Glass Development Kit (GDK)$ android-sdk-linux/tools/android list
Available Android targets:
----------
id: 1 or "android-15"
Name: Android 4.0.3
(…)
----------
id: 2 or "Google Inc.:Glass Development Kit Sneak Peek:15"
Name: Glass Development Kit Sneak Peek
Type: Add-On
Vendor: Google Inc.
Revision: 2
Description: Sneak peek of the Glass Development Kit
Based on Android 4.0.3 (API level 15)
Libraries:
* com.google.android.glass (gdk.jar)
APIs for Glass Development Kit Sneak Peek
Skins: WQVGA400, WVGA854, WSVGA, WXGA720, HVGA, WQVGA432, QVGA,
ABIs : no ABIs.
(…)
![Page 22: Basics of the Google Glass programming](https://reader034.vdocuments.site/reader034/viewer/2022042623/53fa3e188d7f72b82e8b4e3d/html5/thumbnails/22.jpg)
22
Glass Development Kit (GDK)
public class HelloGlassActivity extends Activity
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
TimelineManager timelineManager =
TimelineManager.from(this);
Card card1 = new Card(this);
card1.setText(R.string.hello_message);
card1.setFootnote(new Date().toString());
timelineManager.insert(card1);
finish();
}
}
![Page 23: Basics of the Google Glass programming](https://reader034.vdocuments.site/reader034/viewer/2022042623/53fa3e188d7f72b82e8b4e3d/html5/thumbnails/23.jpg)
23
Glass Development Kit (GDK)$ cat AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.blackaplysia.helloglass"
android:versionCode="1"
android:versionName="1.0">
<application android:label="@string/app_name“
android:icon=“@drawable/ic_launcher”>
<activity android:name=“com.blackaplysia.helloglass.HelloGlassActivity”
android:label=“@string/app_name”
android:icon=“@drawable/ic_launcher”>
<intent-filter>
<action android:name=“android.intent.action.MAIN” />
<action android:name=“com.google.android.glass.action.VOICE_TRIGGER” />
</intent-filter>
<meta-data android:name="com.google.android.glass.VoiceTrigger"
android:resource="@xml/hello" />
</activity>
</application>
</manifest>
![Page 24: Basics of the Google Glass programming](https://reader034.vdocuments.site/reader034/viewer/2022042623/53fa3e188d7f72b82e8b4e3d/html5/thumbnails/24.jpg)
24
Glass Development Kit (GDK)
$ cat res/xml/hello.xml
<?xml version="1.0" encoding="utf-8"?>
<trigger keyword="@string/glass_voice_trigger" />
$ cat res/values/strings.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">HelloGlass</string>
<string name="hello_message">Hello, I am a glassware.</string>
<string name="glass_voice_trigger">say hello</string>
</resources>
![Page 25: Basics of the Google Glass programming](https://reader034.vdocuments.site/reader034/viewer/2022042623/53fa3e188d7f72b82e8b4e3d/html5/thumbnails/25.jpg)
25
Next …
Technical studies Live card
Service modelAction menuVoice command interfaceQR-code oriented input
ImmersionA unique user experience
Enterprise platform services Private web-based API set Input by watch type devices