Google Glass Apps Technological

Google Glass & Android Series for Developers & Users

Google Glass & Android Series by Marcio Valenzuela
Google Glass & Android Series

So I’ve gotten a little carried away with the Glass-Android thing.  My posts are as disorganized as my thoughts, so I thought I’d organize my posts a bit.  Here is the set of posts for Android & Glass Development as of Feb 15th, 2014:

  1. Google Glass Review – Part 1 – 什么 (shen me = what = what Glass is & isn’t)
  2. Google Glass Review – Part 2 – Pros & Cons
  3. Develop apps for Google Glass – Part 3 – Setting up!
  4. Glass Development Mirror API – Part 4 – Where to start after setting up
  5. First Android App – Part 5
  6. First Android App – Part 6
  7. First Google Glass App – Part 7 – Bridge to Glass App GDK Development
  8. First Google Glass App – Part 8 – Hello Glass!

The first 2 parts are more of a Curious George couple of articles telling people what to expect from Glass.  Everyone asks me what they are.  I end up telling people “its just a pair of sunglasses” or “its a computer” and of course they are speechless and I walk away quickly before a long discussion ensues.

The next 2 parts are for developing web service apps for Glass.  Glass can work with web based apps which run on a server and interact with Glass |OR| Glass can have native apps installed into it which it can run on.

The last 4 parts starting with First Android App and finishing with First Google Glass App, is a set of posts for learning how to create native apps for Glass.

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

Philosophical Technological

Why Im not excited about multitasking!

Multitasking iOS OSX Windows Android
Multitasking iOS OSX Windows Android




Why Im not excited about multitasking!  On iOS, OS X, Windows or any other platform, multitasking simply is not a good fit for humans.

The reason is that while these operating systems might multitask and quite efficiently at times, humans and human brains more specifically, cannot multitask.

Let’s take the typical working day. Let’s say that you finish eating lunch at home and get back in the car to drive to your office. On the way to work you remember that you have to pick up some groceries on your way back home.

[toDoArray addObject:@”groceries”];

A few minutes later a call comes in and you are asked to email some information to a client.

[toDoArray addObject:@”emailSales”];

Now you realize you do not have that client’s email, but a friend of yours does have it. You decide to call that friend and ask him for the information so you move over your phone application.  You get the client’s email but along with that information comes an invitation to a social gathering later on that night.  Now you must switch over to your calendar app and add that reminder. You probably want to add a reminder to notify your spouse as well.

[toDoArray addObject:@”socialGatheringAtPedros”];

[toDoArray addObject:@”notifyWife”];

After all these distractions you finally open up your email client in order to send the information. If you’re lucky you have managed to reach your office without crashing.  Don’t cry victory yet, you still have to park your car.

You open up your email client just to realize you have five new email messages.  Two of these require urgent attention.  You are lucky enough to have the information needed by one of these two emails, however you must open up What’s App and search through many chats in order to retrieve information for the last email.

[toDoArray addObject:@”findDataForLastUrgentEmail”];

As luck would have it the information was not in your What’s App application but you are sure it’s either in your Twitter client or Facebook.  You search both these applications without any success and as soon as you are about to tap on Google+, a “Running with Friends” game notification pops up on your screen and you accidentally tap on it and you’re taken to the App Store for an in app purchase.  Now you realize you have about three updates pending for applications. You tap on “Update All” and realize you do not have Internet connectivity at the moment.

[toDoArray addObject:@”updateApps”];

So your phone is multitasking quite well, it has Twitter, Facebook, What’s App, Calendar, App Store and  a few other applications running at the same time.

You on the other hand right now are probably parked on top of your boss’ car, are fired, are getting insulting messages from your spouse because you did not notify her on time, your friend is upset because you did not RSVP, the kids are mad because you did not pick up the groceries, and you have lost one of the most important sales of your career.

[self didReceiveMemoryWarningAndABunchOfOtherRuntimeWarningsAsWel];

[toDoArray dealloc];

[self dealloc];


Translate »