Understanding Google Glass Development: How to get started?

0

We, the developer community, have been hopping around the development ecosystem and creating applications for web (technologies such as Java, .NET, PHP, Ruby, Scala etc) & mobile devices such as smartphones (running iOS, Android), tablet (running iOS, Android) etc.

This year saw the release of Google Glass devices. Google has been doing enough to publicize the google glass and this is expected that there shall be need for Google Glass applications if Google Glass has to be accepted by mass users. That would require developers like us to take a stab at it and create some apps for Google Glass.

If you are very new to google Glass, please read my earlier blogs on Google Glass. This blog is about understanding some basic concepts around google Glass and get started with development.

Before I proceed ahead, I must mention that following are some of the programming languages which has seen support from Google for someone to work with Google Glass Mirror API.

  1. Java
  2. PHP
  3. Python
  4. .NET
  5. GO

What are some of the key concepts one should know to get started with the development?

  • Glassware: This is the software that you build for Glass, and that interacts with the glass device using Google Mirror API (discussed later); However, this software does not run on the glass device unlike the softwares (apps) made for mobile devices such as smartphones and tablets. Some of the common activities with Glasswares are following:
    1. Installation & authenticating the users
    2. Transmitting information to the Glass device using Mirror API. This is done using creation, updation of timeline cards (discussed later)
    3. Receiving notifications from Glass device using Mirror API.

    Simply speaking, Glassware development has nothing to do with any specifics of Google Glass. One can develop Glassware in PHP, Java, .NET, Python etc like any other web application. Once done, one would be required to integrate with Google Mirror API (RESTful) and then, Glassware will be able to transmit information & receive notifications.

  • Google Mirror API: A set of RESTful services that helps your software (Glassware) interacts with Glass devices by transmitting information and receiving notifications.
  • Timeline Cards: As per Thesaurus, timeline is a sequence of related events arranged in chronological order and displayed along a line (usually drawn left to right or top to bottom). For Glass, timeline displays information transmitted by Glassware in form of items. The timeline displays information in form of one or more items also known as cards to the end user. Each timeline card contains information pushed to Glass devices from various pieces of Glassware.In addition, there are default timeline cards that are “pinned” to a timeline, so they always appear in the same place.Timeline information is sent by Glasswares in JSON format. Take a look at the timeline JSON specifications. Some of the key fields are following:
    1. text (Used to send text to the timeline card). Visit playground page to see the sample.
    2. html (used to send html to the timeline card). Visit playground page to see the sample.

Development of Timeline Cards

Timeline cards is the only means using which Glassware interacts with Glass. One can design & develop timeline cards using following methods:

  1. Text. Take a look at following diagram displaying card and related code.
    Timeline Card with Text

    Timeline Card with Text

  2. Built-in HTML templates. Use the templates from playground.Take a look at following diagram displaying card and related code.
    Timeline card with HTML

    Timeline card with HTML

  3. Custom HTML templates: For custom template, place the html in the “html” field of timeline_items. Along with that, use styles found in base_style.css. Get more information on UI guideline page.

Additionally, one can also send photos and videos to the timeline card. Also, one would want to paginate the timeline cards for various different reasons. This is also termed as bundling timeline cards. There are two different techniques for bundling timeline cards. They are following:

– Paging
– Threading

I shall be discussing in detail on above approaches in my later blogs.

Ajitesh Kumar

Ajitesh Kumar

Ajitesh is passionate about various different technologies including programming languages such as Java/JEE, Javascript, PHP, .NET, C/C++, mobile programming languages etc and, computing fundamentals such as application security, cloud computing, API, mobile apps, google glass, big data etc.Recently, he has been digging deep into the field of data science and machine learning.

Follow him on Twitter and Google+.
Ajitesh Kumar

Leave A Reply