Google Glass Apps Technological

Develop apps for Google Glass – Part 3 – Setting up!

Developing apps for Google Glass by Marcio Valenzuela
Developing apps for Google Glass

If you have experience in Android (Java) development, this will be even easier.

What you’ll need:

  1. Google Glass – to test your apps on
  2. Eclipse or Android Studio for coding
  3. Android SDK 15 & Glass Development Kit Sneak Peek (GDK)
  4. Configure adb


Well you either borrow a pair or get your own, but you will need Google Glass to test your apps.  The reason being that there is no Glass emulator as there is for Android as of yet.

Eclipse or Android Studio

Eclipse is the most widely known IDE for Android programming but its worth getting to know Android Studio, the new IDE for developing on Android & Glass. You can get it here:

This is version 0.4.2 but there is a new build, 0.4.3 (Canary) to date of this publication.

Its ok if you choose Eclipse, the differences are minimal in general usage terms.

Android SDK 15 & GDK

If you’re used to iOS, where the IDE (Xcode) already includes the SDK, you’re in for a treat. In this case its necessary to manually get the SDKs; both API 15 as well as GDK. To do this you use the Tools menu & select AVD Manager:

Android Studio SDK Manager Glass GDK Sneak Peek by Marcio Valenzuela
Android Studio SDK Manager Glass GDK Sneak Peek

Now you must pick the right SDKs. I recommend getting these options:

Android Studio SDK Manager Glass GDK Sneak Peek by Marcio Valenzuela
Android Studio SDK Manager Glass GDK Sneak Peek

To install you must then click on Install Packages and individually Accept each license. This will take a while for the SDKs to download.


Now you’re ready to start programming, sorta.  You need the Android Debug Bridge, ADB.  This allows us to connect to Android/Glass devices and debug directly on them.  Again, if you’re coming in from an iOS environment you test on the iPhone Simulator and thats good enough to get started.  However, on Android, BELIEVE me, you DO NOT want to test on the emulator.  Both Eclipse and AS bring the AVD Manager, Android Virtual Device Manager which creates emulators in many configurations.  Just launching these can sometimes waste up to 15 minutes of your precious time.  This means that in a day of coding you can literally waste HOURS just waiting for the emulator to fire up.

Besides, as we mentioned, you can’t test Glass apps on anything but Glass devices.  So this is necessary.

Fortunately if you installed Android Studio, adb is already in Android If you’re on a mac you will need to add this path as an environment variable.  You might even need to create a symbolic link.  This is due to the fact that Android Studio is contained in one of these peculiar .app folders.  As you will see later, its hard to configure some neat development tools if you have files you need to get at, stored inside one of these .app packages.  You can inspect the application package in Finder:

Android Studio Package Contents Environment Variables Symbolic Links ADB Configuration by Marcio Valenzuela
Android Studio Package Contents Environment Variables Symbolic Links ADB Configuration

In order to add an environment variable we first need to edit our ~/.bash_profile from terminal by doing this:

pico ~/.bash_profile

Now add the following line inside pico:

export PATH=/Applications/Android\$PATH

this is assuming you installed Android Studio inside your Applications folder.

Now dab is accesible from any terminal.  So test it by opening a terminal and doing this:

adb devices

this should start the adb daemon and list all devices plugged into your USB ports which are in Debug Mode.

Finally, a cool dev tool is an app called Droid@Screen which can be used to display your Glass screen on your development computer screen.  you can get the latest version of it here:

The most current version was 1.0.2 to date of this publication.

In order to configure Droid@Screen we need to tell it where adb is.  The Android folder structure we talked about is not recognized by most apps.  This it is necessary to create a symbolic link to our dab file. We can do this by using this command:

ln -s /Applications/Android /Applications/adb

which creates a symbolic link from the first URL via the second URL.  Now you can point your Droid@Screen configuration to this path.

You are ready to create Glass apps!

Any questions can be addressed to


Android vs iOS

A friend of mine recently send me an email with this link from listing the 5 Android features that leave iOS in the dust.  Here are my thoughts in response:

1.  Homescreen/widgets.  These drain battery life, which is why iOS doesnt have them.  I’ve been learning to code in Android and their OS can run as many background services as apps that contain them.  This drains battery and consumes bandwidth. iOS’s solution is APNS or push notifications which a server running on the internet can send to the device instead.  Its not as fancy as Android, I agree, but ill trade it for battery life anyday.  When hardware manufact can come up with a battery that will last for days, Apple’s iOS is a few code snippets away from implementing all those features.  Im sure its probably coded already.  Apple is a very business as well as tech savvy company.  They know how to release features and products when the market is ready.  Take their strategy on iPhones.  They could have left Android in the dust a few years ago but everyone wondered why Apple would limit their iPhone to ATT only.  They know the advantage the first comer has and how long they can make that lead last without it hurting their business.  Which is why Apple is so profitable aside from being so cool and market leader etc…

2.  Flash.  Please, as they say in my country, “y vuelve la mula al trigo”.  Loosely translated it, it means “not that again!”.  I have enough user experience to know that Flash is buggy and causes problems.  You dont need to know anything about coding to know this is so.  Just load a page that is loaded with Flash ads and see how slow i loads, slow it scrolls and often skips.  Flash is nice, but its not that important to the internet.  Moreover, with HTML5 coming round the bend, its clear this “nice feature” & “advantage” will be shortlived at most.
3.  Customizability.  This is true, Android is more customizable.  Apple’s response, it listens to customers and eventually puts things into play, as it has with a lot of features like the flash, twitter integration, notifications and so many others.  Its not as quick to market with these features but they make it into the iOS soon enough to make users think, “Hey, i thought of that!”.  The other side of the coin to me is much more worth it; the OS stability.  I have been coding for Android for about a month and iOS for about 3 years.  Anyone who has done so can easily tell you the tools and debugging and overall stability of iOS is far better than that of Android.  This results in better quality products.  Id rather have a stable mobile device OS than one where programmers can control your device in many ways you may not even know about and have no supervision over what programmer’s apps can do, see, send, delete, create and poke around in your mobile device.
4.  Voice Control.  I have been playing around with Dragon for a while and other apps that give voice control functionality to iOS, including Google’s own Google Mobile App.  Plus with Apple’s move into Nuance, thats just like saying…”I just got the latest Buck Rogers action figure”….”Great, Im gettin mine tomorrow!”.
5.  Google Accnt Integration.  Alas, an actual advantage.  The afore mentioned were comparative advantages.  They dont really represent a core, solid, durable advantage.  Anyone in business will tell you, they are simply features that can be copied and implemented.  This on the other hand is indeed a real advantage because its not easily reproduced.  I love gmail and so does the rest of the world so unless Apple came up with a back-end solution for this in their new Cupertino Spaceship campus, but it would be better to simply buy Google out :).  (Im kidding).  But it would be better to just play nice with Google on that.
In conclusion, far from leaving iOS in the dust with 4 features, the one real advantage Google Android has over iOS is their integration with their own back-end services.  Nothing a little money and an alliance can’t remedy.  Just ask the motown 4 [the 4 major record labels Apple signed up for their iTunes Cloud Service]. 🙂
Translate »