Creating Google Glass Applications
If you are looking to build a smart application, look no further than Google Glass, the hi-tech wearable that is changing the world.
Google Glass application development has evolved over the years. When initially launched, application development leveraged the Mirror API. The Mirror API is more of a server model. It is good for exchanging information between the server and the device. The typical usage would be reading messages like Facebook or Twitter updates.
Working with the Google SDK requires developers to use the Android toolset. This means that developers need to be familiar with the Android development model and Android build tools.
To start Google Glass development, you need to have tools to build Android apps: Android Studio (unless you want to use Eclipse and install the ADT bundle). You also will need to have a Google Glass device.
Android Studio is available for download from here.
If you have a recent build of Android Studio, you are already using a newer version of the Android SDK platform. If not, please upgrade to use the latest version of the Android SDK (API 19 or higher)
To get the Glass Development Kit, open Android Studio and click Configure.
Figure 1: Opening Android Studio
Choose SDK Manager.
Figure 2: Choosing the SDK Manager
This will launch the SDK Manager.
Navigate to Android 4.4.2 (API 19) and choose "Glass Development Kit Preview." I also would recommend choosing the "Samples for SDK,"
Figure 3: Choosing the "Glass Development Kit Preview"
Click Install packages to begin installing the packages. You will be prompted to accept the licenses for the packages you are trying to install.
Figure 4: Accepting the licenses
Accept and click Install to complete the installation.
Once the installation is complete, we are ready to start building Google Glass applications.
Building a Google Glass Application
Fire up Android Studio and Start a new Android Studio Project.
Figure 5: Starting a new Android Studio Project
Provide GoogleGlassDemo as the Application Name and click Next.
Figure 6: Providing an application name
On the next screen, choose Google Glass and click Next.
Figure 7: Choosing Google Glass
On the "Add an activity to Glass" page, choose "Immersion Activity."
Figure 8: Adding an activity
We then are prompted to customize the activity. We will leave the default values unchanged.
Figure 9: Leaving the default values unchanged
Click Finish to creating the project files.
Our basic Google Glass application is now created. Connect your Glass device and select the option to run the application on your device. If Google Glass is not getting detected, check your USB connection. You should be seeing the device when you choose to Run or Debug the application in the "Edit Configuration" window.
Figure 10: Seeing that the device is present
You can see how simple it is to get building for Google Glass.
In this article, we learned about Google Glass application development and how to start building a simple Google Glass application. I hope you have found this information useful.
Download the Software
You can download the accompanying software from this link.
About the Author
Vipul Patel is a technology geek based in Seattle. He can be reached at email@example.com. You can visit his LinkedIn profile at https://www.linkedin.com/pub/vipul-patel/6/675/508.