How To Play With Google Mirror API For Developing Your Google Glass App

You might be hearing about Google Glass on every day course, but Google Mirror API must have slipped off your ears. How about a life when you wear a glass as a user and just have to say “Okay Glass!”? And there you go with Glass serving you like a charm within seconds. But what if you are a developer and have to develop such an application which allows Glass to work as desired by user, I wish one day we developers can have magic words like “okay glass, develop an action game for me!” or “okay glass, develop a wish genie for me!” but that effortless day seems far away from now. However, for now we do have magical web service with us created by Google and shared for developers known as “Google Mirror API” this sounds like some pro-programming platform, but yea it’s really useful and at the same time it’s very powerful.

google mirror api released

A word about Google Mirror API

Google Mirror API (Application Programming Interface) allows you to build web services which are known as Glassware, this can interact with Google Glass using cloud-based API and doesn’t require running code on Glass.

Using Mirror API you can program and manage almost all the perspective of your Google Glass services. Major Features are described in following section:

How to Manage Timeline Cards:

They form the most important basis of user experience and are responsible for displaying contents that users perceive on the Glass. Using Mirror API you can create, upload and delete these cards. Timeline cards can be in text, HTML, images or video. For better organisation you can wrap one timeline card with bundles of other sub time line cards which will facilitate more organised tasking.

How to step wise design a Time line card? Visit this programming guide here

Designing and modifying your menu items

Menu items are used on timeline cards which includes built-in actions like read aloud, voice reply and navigation. It can be designed the way you want your menu item to behave. You can visit this guide where more simplified programming steps can be found to design your menu items which will be attached on your timeline.

Let users subscribe to timeline notifications and keeps them busy

Notifications work as hawk-eye for users by giving them services which are available in nearby surroundings. Here Google Mirror API sends notifications regarding user events onto your Glass whenever it detects some specific action from the user side.

General notifications are given when user selects menu items, shares content with contact or when user’s location gets updated at any finite interval. Here is the link to developer’s guide regarding how to custom design this notification feature for your APP.

Sharing items or your timeline contents with your contacts

Here contacts doesn’t follow a common term of only a person in your contact list, but in terms of Glass a Contact can be any person or another piece of Google Glass. The details which can be shared with contacts are cards bear the things such as photos, videos, or text and how to design your own contact entity is described in this guide.

Defining the user Location

On receiving authentication from the user, Glass should be able to notify user about the correct location. For this you should be aware of user’s current location and should subscribe to normal location updates which occur frequently. For detailed guide of how to program this section, have a look to these steps in developers section which shall put you off the ground.

Source: Google Developers