GDK Quick Start
Before you begin to use the GDK, you need intermediate or better knowledge in Android development.
This quick start gets your environment set up with the GDK and shows you how to install your first piece of Glassware.
For Android experts
If you're comfortable with Android, here's all you need to know:
- Get the Android 4.0.3 (API 15) SDK and Glass Development Kit Sneak Peek add-on from the Android SDK Manager.
- On Glass, turn on USB debugging (Settings > Device Info > Turn on debug).
- Import some GDK samples with the File > New Project > Android Sample Project menu.
- When you're ready to create a project for your own Glassware, use these settings:
- Minimum and Target SDK Versions: 15 (There is only one Glass version, so minimum and target SDK are the same.)
- Compile with: Glass Development Kit Sneak Peek
- Theme: None (This allows the Glass theme to be applied.)
- Head on over to the developer guides for more learning.
For Android beginners
Setting up the development environment
- We recommend installing the ADT Bundle for easier development. The rest of these steps assume you have this installed.
- Click Window > Android SDK Manager.
- Install the SDK Platform and Google GDK Sneak Peek for Android 4.0.3 (API 15). Everything else is optional.
- On Glass, go to Settings > Device Info > Turn on debug to enable
adb, which allows your development system to communicate with Glass.
- Connect Glass to your development system and confirm that it's detected by clicking Window > Open Perspective > DDMS and verifying Glass appears in the Devices tab.
Installing the samples
To see the source of and install a simple piece of Glassware, import one of the bundled GDK samples into Eclipse:
- Click File > New Project > Android Sample Project
- Select Glass Development Kit as the build target and click Next.
- Select the Compass, Stopwatch, or Timer sample and click Finish.
- In the Eclipse Package Explorer, right click the sample and select Run as > Android Application with Glass connected to your development system.