developing for glass & alfresco

23
Google Glass Developing for Glass & Alfresco Jared Ottley Engineer @jottley

Upload: jared-ottley

Post on 15-Jun-2015

94 views

Category:

Technology


1 download

DESCRIPTION

Alfresco Summit 2014. Session: Bringing Alfresco to Google Glass. Google Glass is helping lead the revolution of how we interact with information both in capture and notification. There is a revolution coming on how users will interact and collaborate around content from wearables like Google Glass. This session will discuss what Google Glass provides. We will discuss how we can build on this platform to integrate with Alfresco by building a simple notification app. We will demonstrate uploading content to Alfresco from Google Glass and sending content to Glass.

TRANSCRIPT

Page 1: Developing for Glass & Alfresco

Google Glass

Developing for Glass & Alfresco

Jared OttleyEngineer@jottley

Page 2: Developing for Glass & Alfresco

APIs

Page 3: Developing for Glass & Alfresco

GDK – Glass Development Kit• Add-on to the Android SDK

Page 4: Developing for Glass & Alfresco

GDK – Glass Development Kit

Real-time User Interaction Offline Functionality

Access To Hardware

Page 5: Developing for Glass & Alfresco

Mirror

• RESTful API

POST /mirror/v1/timeline HTTP/1.1Host: www.googleapis.comAuthorization: Bearer {auth token}Content-Type: application/jsonContent-Length: 26

{ "text": "Hello world" }

Page 6: Developing for Glass & Alfresco

Mirror

Platform Independence Common Infrastructure

Built-in Functionality

Page 7: Developing for Glass & Alfresco

Must I use just one API

Page 8: Developing for Glass & Alfresco

• Hybrid Approach

GDK and Mirror

Page 9: Developing for Glass & Alfresco

What can I send to Glass

Page 10: Developing for Glass & Alfresco

Card Attachments – Static

Text Image Video

Bundle

Page 11: Developing for Glass & Alfresco

Live Card

Page 12: Developing for Glass & Alfresco

Immersion

Page 13: Developing for Glass & Alfresco

Who wants to see a demo

Page 14: Developing for Glass & Alfresco

Use Case #1

• Publish Image to Glass• Document Library

Action• Repo Service• Google OAuth Client

Page 15: Developing for Glass & Alfresco
Page 16: Developing for Glass & Alfresco

White: Blank (no brand)

Sample Code – Insert To Timeline

//Get the Mirror APIMirror mirror = getMirrorApi(credential);

//Create a new TimelineItem ie CardTimelineItem item = new TimelineItem();

//Get the FileInfo for the NodeFileInfo fileInfo = fileFolderService.getFileInfo(nodeRef); //Set the file name as the title of the Carditem.setTitle(fileInfo.getName());

//Create insert action (mimetype, inputStream)Insert insert = mirror.timeline().insert(item, new InputStreamContent(fileInfo.getContentData().getMimetype(), fileFolderService.getReader(nodeRef).getContentInputStream()));

//execute insertinsert.execute();

Page 17: Developing for Glass & Alfresco

Use Case #2

• Retrieve Image from Alfresco• GDK Glassware• Glass Web browser• Alfresco Share Proxy

Page 18: Developing for Glass & Alfresco
Page 19: Developing for Glass & Alfresco

White: Blank (no brand)

Sample Code – Retrieve from Alfrescoprivate void handleResult(Result result) { //This is very nasty. Hardcoded user and password. //Proxy will only show images within the browser.

//Need a new call to transform documents to images. String url = "http://admin:[email protected]:8081 \

/share/ proxy/alfresco/api/node/content/workspace/ \SpacesStore/" + result.getText() + "/glass";

//define activity intent to open a url Intent intent = new Intent(Intent.ACTION_VIEW, \ Uri.parse(url));

//load image startActivity(intent);}

Page 20: Developing for Glass & Alfresco

Where is the code?

• All code is POC – offered with no support!

• https://github.com/jottley/stainedglass

• https://github.com/jottley/zxing

Page 21: Developing for Glass & Alfresco

Q&A

Page 22: Developing for Glass & Alfresco

@wabson @rwijangco

@tsgrp

@ZXing

Page 23: Developing for Glass & Alfresco