Understanding Google Glass Development: How to get started?

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
Follow me

Ajitesh Kumar

I have been recently working in the area of Data analytics including Data Science and Machine Learning / Deep Learning. I am also passionate about different technologies including programming languages such as Java/JEE, Javascript, Python, R, Julia, etc, and technologies such as Blockchain, mobile computing, cloud-native technologies, application security, cloud computing platforms, big data, etc. For latest updates and blogs, follow us on Twitter. I would love to connect with you on Linkedin. Check out my latest book titled as First Principles Thinking: Building winning products using first principles thinking. Check out my other blog, Revive-n-Thrive.com
Posted in Google Glass. Tagged with , , .

Leave a Reply

Your email address will not be published. Required fields are marked *