Join the discussion on Hacker News!

Myself and other developers have been giddy with glee at the recent release of Google Glass, one of the first largely available wearable computing platforms. After the Glass Foundry hackathons in January, I couldn’t wait to start building awesome applications such as GlassTweet with the Mirror API and helping others do the same.

Today, I’d like to debut the first tutorial on building Twilio applications for Google Glass, where you will learn how to receive SMS messages via a Twilio phone number on your Google glass and how to respond to them using the Glass voice commands.

Glass can send and receive SMS by default via the MyGlass Android app. However, I often use Twilio phone numbers for people I would not be comfortable giving my real phone number to. I wanted to be able to receive SMS just through my Glass device, not my phone, and only receive SMS from certain people.

If you’d like to see the end result, check out the video below before getting started:

Let’s Get Started

The first step is to follow the Mirror API quickstart guide – while this guide is for Python, the steps for creating a new Mirror Application in Google’s API console are the same as for Ruby. Once you have your Client ID and Secret, we can move on.

A few more basics before we get started: If you haven’t used Sinatra before, I recommend giving a quick look at their README. For those of you coming from a Python background, it is a similar framework to Flask. If you are new to Twilio, make sure you have signed up for an account and have upgraded it so that you can send outgoing SMS to unverified numbers. I would also recommend reading some of our Quickstart tutorials.

Now let’s dive into some code! First off, lets set up our Gemfile and config.ru: