How to Build Apps with the Glass Development Kit (GDK) - dummies

How to Build Apps with the Glass Development Kit (GDK)

The Glass Development Kit (GDK) is for people who already know how to develop apps for the Android operating system and want to get building. Even if you’re a seasoned Android developer, the differences in the Glass user interface create a learning curve.

Setting up the GDK

These instructions presume that you already have the ADT (Android Developer Tools) bundle installed and running on the computer you use to develop software. If you don’t, download the ADT from the Android Developers website.

With that out of the way, here’s how to set up GDK within the ADT bundle window:

  1. Click Window on the menu bar.

  2. Click Android SDK Manager.

    The Android SDK Manager window appears.

  3. In the Android 4.0.3 (API 15) section, check the boxes labeled SDK Platform and Glass Development Kit Sneak Peek.

    The ADT bundle installs both items.


Connecting Glass to the GDK

To connect your Glass to the GDK, follow these steps:

  1. Put your Glass on your head, if you haven’t done so already.

  2. Select the Settings card.

  3. Select the Device Info Settings card.

  4. Tap Debug.

When you’re set up, you can verify the connection between your Glass and the GDK by opening the Eclipse app on your computer. This app allows you to create apps in a variety of languages, such as Java, Python, PHP, and C. You can confirm that Glass and the GDK are connected from within the Eclipse app by following these steps:

  1. Choose Window→Open Perspective→DDMS.

    The DDMS window opens.

  2. Verify that Glass is listed on the Devices tab.

Checking out sample Glassware

If you want to see examples of what Glassware looks like, the GDK contains several sample files for you to play with. Here’s how to find and launch them on your computer within the Eclipse app window:

  1. Choose File→New Project→Android Sample Project.

    The Android Sample Project window appears.

  2. Check the Glass Development Kit box, and click Next.

  3. Check the box next to the name of the sample you want to run.

    You can choose the Compass, Stopwatch, or Time sample.

  4. Click Finish.

    You return to the Eclipse app window.

  5. Right-click the sample name in the list and choose Run As from the contextual menu.

    A new window opens, asking whether you want to run the app on your computer within the Glass emulator or on the Glass device that’s connected to your computer.

  6. Click Glass Device.

    You see the sample Glassware running on the Glass screen.

Getting to work

When you’ve finished inspecting the sample files, put this book down and visit the Google Developers website so you can go through the interactive Building Your First App tutorial. You can also explore the Developers website to see whether the other tutorials on the site strike your fancy.

You should build a few simple Glassware apps before you start building the Glassware of your dreams. Practice gives you the experience you need to prevent development headaches later.