Google Mirror API Overview
The Google Mirror API allows you to build web-based services, called Glassware, that interact with Google Glass. It provides this functionality over a cloud-based API and does not require running code on Glass. The major features are described in the following sections.
Managing timeline cards
Timeline cards display the content that your users see and are at the core of the user experience. Timeline cards can be text, rich HTML, images, or video. You can also bundle timeline cards together into one timeline card that expands into a sub-timeline for easy organization.
The Google Mirror API provides endpoints for actions such as creating, updating, deleting, and much more.
See the following resources for more information about timeline cards:
Interacting with menu items
You can specify menu items on timeline cards that you create. These can include built-in actions like read aloud, reply by voice, and navigate to. Additionally, you can specify your own custom actions specific to your service.
See the following resources for more information about menu items:
Subscribing to timeline notifications
The Google Mirror API can send notifications of user events to your Glassware, which include:
- When a user selects menu items
- When a user shares content with a contact
- The user's location, every ten minutes or so
To receive notifications, you create a subscription to them, specifying a callback URL that receives the notification when it occurs. When you receive the notification, you can carry out the desired action based on the notification.
See the following resources for more information about subscribing to timeline notifications:
Sharing to contacts
A contact is an entity that users can share cards with. This entity can represent a person or even another piece of Glassware. Cards can contain things such as photos, videos, or text. You can also specify the MIME types that your contact can handle, so users can only share valid cards with your Glassware.
See the following resources for more information about sharing to contacts:
Working with user location
You can make your Glassware aware of users' locations if users grant you access. You request location information through a special location scope, where you can then see the location of their timeline items and also subscribe to location updates that occur at regular intervals. In addition, you can attach a location to a timeline card and offer a menu item to the user to navigate to the attached location.
See the following resources for more information about location features: