Lately, I have been working on a Glass App for Fusion CRM, as a research project for my own personal edification. As developers, the normal way to create a Glass app is to use HTML 5 and JSON to construct the timeline cards. Building on Glass is like building a web application. When going through the Mirror API developer’s guide, although most things are quite clear, there are bits of details not fully explained.
The good news is there are resources out there to assist you:
1. The Glass Quick Start project came in handy. It is great to use it as the base, as there are some interactions with Glass already implemented. Plus, OAuth 2 authentication is already baked into the project itself.
2. Mirror playground. It provides developers a way to experiment with how the pages will come out in Glass, before actually deploying the application. Changes can be made on the JSON, raw text and the actual UI itself. Pretty slick. If you own Glass, you can also see the cards currently on your timeline.
Requirement:
Someone within your team must be a Glass Explorer to be whitelisted by Google to use the Mirror API. The Mirror API can be enabled in the Google API console. The Glass Explorer can create a project with Mirror API enabled and share it with the teammates.
Couple notes worth pointing out:
1. You need to do some tweaking to be able to use all capabilities of the Mirror API in development environments. In particular, you would not be able to receive location and timeline notifications from Glass without SSL enabled.
2. There is a 1000 requests/day limit for Mirror API. While developing the application, I was able to exceed the limit in couple hours. If you exceed the quota, you would be out of luck and need to wait till the next day to continue your work. I hope Google would increase the quota limit some time soon in the future.
3. Some provided functions do not really work. For example, even though there exists a Mirror API to pin a card, it does not actually work. You would need to test out the features you are planning to use.
4. All JavaScript code will be sanitized and removed before displaying it on Glass. No need to be too creative.