Google Glass developers make Mirror API simple with Cat Facts

May 16, 2013
0
Google Glass developers make Mirror API simple with Cat Facts

Google's 2013 developer conference this year didn't give immediate attention to Glass, at least not at its one and only keynote address - but behind the scenes, development ran deep. Speaking together at a developer chat session centered on "Building Glassware" with what the company calls its Google Mirror API, Jenny Murphy and Alain Vongsouvanh made the case for the future.

Alain Vongsouvanh is a Developer Programs Engineer on Google Glass and the Google Mirror API. Jenny Murphy is also a Developer Programs Engineer for Glass with Google and both of these folks help developers work with the code that brings Google Glass apps to life.

Timeline and Menu

"The Mirror API is one managed through requests made through connections. The main one is a Timeline text card." This connection is separate from a Gmail connection and separate from a Map connection - it exists as its own element unique to Glass. The most basic setup here is with text and an image.

Customizing these cards are as simple as writing HTML code, but it's not as all-inclusive as, say, a Chrome web browser-displayed webpage. Google provides a Playground where tests and development can be done, offering here basic templates for developers and allowing them to start from scratch.

timeline

This system offers a variety of basic menu items like back and send, and developers are able to create custom menu items like "Complete!" The theme here is simplicity - this development environment is as simple as writing a bit of Java - not something someone off the street will be able to pick up in no time without any knowledge of creating with code, but certainly something that's simple for a web developer or creator of apps for smart devices.

Contacts

Contacts is a system that a user will share to - just like they are on an Android smartphone. Developers can create a Contact Resource where they'll have to set an ID that corresponds to a user, users, or a third party app. By default, a shareable element will trigger a list of apps and elements that are compatible with sharing.

contacts

Subscriptions and Locations

With Subscriptions, developers will be bringing forward notifications about changes. Instead of you posting to the API, the API will post to the device - input rather than output, so to speak. The developer will specify elements like Collection, User Token, Token Verification, and a Callback URL where needed.

voodoo

A developer working with Subscriptions in Glass will be working with Timeline as well as Locations - this means they've got to account for both how the element is posted and what's being posted, where it came from and what it's doing.

Cat Facts

With an extremely simple Glassware app by the name of Cat Facts, Vongsouvanh showed how each of the five different elements in the Mirror API. Below you'll see his explanation of how it's not always necessary to work with all five of these bits and pieces, but how even something so simple as this app will be working with more than one.


Must Read Bits & Bytes