Google publishes Glass Mirror API Developer's Guide and best practices

    Today, Google announced the start of shipments of the first Google Glass and at the same time published a significant part of the documentation for developing applications for them.

    This is primarily a developer guide for the Glass Mirror API. Access to the API itself is still in limited access and is open only to developers who have the device itself. The rest so far, as in better times, can start making applications based on documentation, but they will not be able to test them.

    This is the first version of the API., which allows developers to write what Google calls Glassware, is relatively poor in functionality and the best feature is probably the ability to get the location of the glasses owner. Since each application interacts with Points through Google services, the API supports RESTful services and is completely cloud-free - no code is executed on the Points themselves.



    At its core, the API allows developers to send and receive information from the device. Using the API seems relatively simple, albeit limited. Users subscribe to a new application on the developer's site (Google has released a number of corporate icons for this).

    Google now offers starter projects for Java and Python developers, as well as Go, PHP, .NET, Ruby, and Dart client libraries .

    Glassware

    API gives developers the ability to communicate with the user through cards, which may include text, HTML code, images and video. Such cards are similar to Google Now cards for Android and can be grouped into packages - and users can move between them - or be single.

    The API, in addition, can add menu items to its applications. It can be system commands, such as "read aloud", or your own commands created specifically for the application - they can be called from the menu or by voice.

    As for the interface, Google gave developers the ability to use HTML, and the Glass team provided the main CSS file . According to Google, “creating your own template gives you the power to control the display of content, but responsibility comes with power.”

    Photos and videos (H.264) must have an aspect ratio of 16x9 and a resolution of 640x360 (this is the maximum resolution of Glass). Audio in AAC and MP3.

    Best practics

    Given that Glass is a new concept, Google also made some general recommendations on how applications should interact with Glasses, although it is not yet clear how the company will enforce them.

    Developers, Google says, must remember that applications are created for glasses and always test their applications on a device before publishing. Applications should not obscure the user's eyes or annoy him with frequent and loud notifications. Applications, in addition, should focus on real-time work and respond to user actions as quickly as possible. And given that the Points are worn all day, developers should not surprise the user with "unexpected functionality."

    In general, the first release greatly limits the capabilities of developers, but this is indeed the first release and it is likely that the functionality of the program interfaces will be expanded soon.

    Below are a few videos in which Google explains some of the features of the Mirror API:






    Also popular now: