Subscriptions

The point of a subscription is to respond in some way to some event. If you have ever subscribed to a newspaper, you’re familiar with the concept. Every time a new paper is available, you are notified by getting a copy with that day’s articles. Rather than notifying you on a fixed basis (such as daily) Glass gives you a more real-time notification.

In Mirror’s terms, whenever a state changes, you are notified. But to be notified you must subscribe, and for that, you use the Subscription resource. Your application can subscribe to several combinations of Glass events and actions, all of which can be found in Appendix 1, HTTP and HTML Resources. You can create a new subscription for either a timeline or location event, called a ...

Get Programming Google Glass now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.