Google Glass Developing for Glass & Alfresco
APIs
GDK – Glass Development Kit Add-on to the Android SDK
GDK – Glass Development Kit Real-time User Interaction Offline Functionality Access To Hardware
Mirror RESTful API POST /mirror/v1/timeline HTTP/1.1 Host: www.googleapis.com Authorization: Bearer {auth token} Content-Type: application/json Content-Length: 26 { "text": "Hello world" }
Platform Independence Common Infrastructure Built-in Functionality Mirror Platform Independence Common Infrastructure Built-in Functionality
Must I use just one API
GDK and Mirror Hybrid Approach
What can I send to Glass
Card Attachments – Static Text Image Video Bundle
Live Card
Immersion
Who wants to see a demo
Use Case #1 Publish Image to Glass Document Library Action Repo Service Google OAuth Client
Sample Code – Insert To Timeline //Get the Mirror API Mirror mirror = getMirrorApi(credential); //Create a new TimelineItem ie Card TimelineItem item = new TimelineItem(); //Get the FileInfo for the Node FileInfo fileInfo = fileFolderService.getFileInfo(nodeRef); //Set the file name as the title of the Card item.setTitle(fileInfo.getName()); //Create insert action (mimetype, inputStream) Insert insert = mirror.timeline().insert(item, new InputStreamContent(fileInfo.getContentData().getMimetype(), fileFolderService.getReader(nodeRef).getContentInputStream())); //execute insert insert.execute(); White: Blank (no brand)
Use Case #2 Retrieve Image from Alfresco GDK Glassware Glass Web browser Alfresco Share Proxy
Sample Code – Retrieve from Alfresco private 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:admin@156.124.12.34: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); } White: Blank (no brand)
Where is the code? All code is POC – offered with no support! https://github.com/jottley/stainedglass https://github.com/jottley/zxing
Q&A
@wabson @rwijangco @tsgrp @ZXing
White: Comparison Heading Left Heading Right Level 1 Level 2 Level 3 DO NOT USE
White: Title (no brand)
Sample Code { // extract avm store id and path var fullpath = url.extension.split("/"); if (fullpath.length == 0) status.code = 400; status.message = "Store id has not been provided."; status.redirect = true; break script; } var storeid = fullpath[0]; var path = (fullpath.length == 1 ? "/" : "/" + fullpath.slice(1).join("/"));
White: Blank (no brand)
White: Picture and Caption
Image Library
Color Palette Lemon Tangerine Sky Blueberry Leaf Chalkboard Soil Clay Sand
Iconography
Logo and Tagline
Other Graphics
A Sample Slide This is a bullet Header without bullet This is a level 2 bullet This is a level 3 bullet Header without bullet This is level 3, avoid going below this level. 20% Cloud 60% Hybrid 20% On-Prem Example Graphic
Fonts & Styling Helvetica Neue Medium Helvetica Neue Medium (Bold) Helvetica Neue Light Helvetica Neue Light (Bold) Helvetica Neue Thin Helvetica Neue Thin (Bold)
Color Palette & Sample Shapes Lemon Tangerine Sky Blueberry Leaf Chalkboard Soil Clay Sand
Government & Intelligence Alfresco in information intensive industries Our sweet spot – industries that need process, control and collaboration Government & Intelligence Banking & Insurance Manufacturing Media & Publishing High Tech