Monday, April 8, 2013

Developing Services for Google Glasses - Notes from SXSW session

Here are some notes from Timothy Jordan's talk at SXSW with regards to developing for Google Glasses using the Glass Mirror API. The complete video can be seen here. From now, unless specified otherwise, the term 'Glasses' used in the text below refers to 'Google Glasses'

General Terms
  • Cards - A single screen being displayed to the user. The type of cards can be Text, Text + Images, Rich HTML and Video.
  • Bundle - A 'nested' Card. This card has a 'fold' at the upper-right corner, and can contain a collection of other Card(s).
  • Timeline - A chronological collection of Cards. Over a period of time, the various screens that you saw on Glasses get stacked on a 'Timeline'. This seems to be akin to a browser's history. You can use the touchpad to navigate between the various cards on a Timeline. It would be interesting to know how deep is this stack of cards, and also what happens if you want to delete a particular card in the timeline.
  • Share Entities - This is used to expose a Service's functionality to other Services. If you have a background with Android, this is akin to how Applications can expose their functionality to other  Applications, via Intents.
Glass Mirror API 
  • The slides showed Google as being the intermediary between a developer's services and the end user's device.
  • In other words Glass sync takes care of Sync'ing between Google's servers and the user's device. This also means that a developer's service does not need to know if the user's device is currently on / off, or connected / disconnected etc.
  • The user needs to approve a developer's services so that they are allowed to enter Timeline cards in a user timeline. This is akin to an 'installation' process.
  • REST, OAuth2 and JSON technologies are used to push information to user's device from approved services.
  • For example if you want to post 'Hello World' on a user's screen, you would send the JSON payload {"text": "Hello world"} to Google's Mirror API end-point with the appropriate Auth Token.
  • There are two ways to create 'Bundles'. The first technique is 'Pagination' oriented. For more information, take a look at the video around the 20:42 mark. In the other technique, you create discrete cards, but provide a common bundle Id for the bundled cards, thereby creating a Bundle. 
  • To update an existing Card, you send an HTTP PUT request.
  • To delete an existing Card, you send an HTTP DELETE request.
  • To retrieve a card, you send an HTTP GET request.
  • Whenever you create a new Card, you can also specify actions/options associated with that Card. 'Reply' and 'Read aloud' are system options ( built into the framework ). You can also specify 'Custom' actions.
  • Subscriptions are a way by which the user's device communicates back to a Developer's services, via Google's servers. Subscriptions are therefore like the 'callback' mechanism for user's actions. A developer's service needs to subscribe in order to receive callbacks. Presumably you get an action's actionId in the callback, based upon which you determine the appropriate course of action to be taken. What concerns me about this is the response time for the end user since the information about a user's action needs to be sent to Google, then to the developer's servers and then presumably back along a similar route. 
Guidelines
  • "Design for Glass" ( and ofcourse experience it on Glass !) - Design for quick interactions.
  • "Don't get in the way" for example via infrequent notifications, and by not showing Modal selections.
  • "Timely notifications" because Glass is a 'right here, right now' device.
  • "Avoid the unexpected", via transparency of functionality
General Notes about Glasses
  • Glasses are never directly in-front of the eyes but at the right top.
  • One of the most common way(s) of interacting with the Glasses is via speech.
  • There is a touchpad to the side of the Glasses. The various gestures which were demonstrated were swipe forward, backward, up, down and tap.
  • 'Basic' head gesture(s) can also be used to interact with Glasses ( check-out the original talk video around the 13:45 mark )
Demos
  • Sample Apps developed by NYTimes, Gmail, Evernote and Path specifically for Glasses were demonstrated.