Chapter 14
In This Chapter
Giving users the best experience in your Glass app
Deciding how to develop a Glass app
Submitting your Glassware for inclusion on the MyGlass website
If you give a hacker a new toy, the first thing he’ll do is take it apart to figure out how it works.
— Jamie Zawinski
When desktop computers were new and exciting (in the 1970s and 1980s), the term hack appeared in the computing lexicon. If you were a hacker who hacked a computer, it meant that you were able to figure out how to make the computer do useful, interesting, and/or unexpected things that you would share with others. Your hack inspired others to hack more computers and do more useful things. These days, however, the terms hack and hacker have negative connotations.
Glass brings new, exciting technology to the computing realm, so when we say hacking in this chapter, we mean teaching Glass new tricks, building something useful, and inspiring other Glass app developers.
Google wants as many people as possible to develop Glassware — apps for Glass — because (blunt honesty alert) if more Glassware is available, more people are likely to buy Glass. What’s more, if you offer good-quality Glassware, your chances of submitting even more Glassware to the MyGlass website go up.
Glass has some specific user interface requirements that you need to follow, not only to create a great app, but also to give users the features they expect after they’ve used other Glass apps.
Glass is designed to provide quick information that adds to what the user is experiencing in real life. Too much information, however, subtracts from the user’s experience. Users are looking at real life as well as information on the Glass screen, so it’s important to make the information displayed on your Glassware as unobtrusive as possible.
One good example of how to use the Glass interface correctly is Google Search. If a user searches for jellyfish while viewing the creatures in an aquarium, for example, a brief definition of jellyfish appears on her Glass screen just above her line of sight (see Figure 14-1). The definition doesn’t detract from her view of the jellyfish in the aquarium tank in front of her.
What’s more, information provided at inappropriate times will likely cause users to remove your Glassware…and tell all their friends to avoid it, too. Consider the example shown in Figure 14-2. The user wakes up very early in the morning and puts on his Glass to see what’s going on. A few seconds later, he sees an ad for a cabbage sale.
Chances are pretty good that most users don’t need cabbage at 3:37 a.m., and most grocery stores are closed at that time anyway. If the user regularly shops at a 24-hour supermarket, however, and needs to get cabbage for the day’s holiday meal right away, the ad may be appropriate. Your app can use the GPS connection between your app and your smartphone to “see” that the user is in or near the store and display information about that cabbage sale.
The information on the screen should be both current and relevant to what the user is seeing on her Glass so she’s convinced that your Glassware is important. If the user isn’t convinced, she won’t let your wares take up valuable storage space on her Glass.
If a user needs to pop over to the grocery store to pick up some dinner, for example, she can use the Evernote app to display the shopping list on the Glass screen. This app saves the Glass user time because she doesn’t have to fumble for her smartphone or a handwritten list to find out what’s needed. Instead, she can focus on shopping.
Users are going to use their voices to manipulate Glass and Glassware, so it’s important to implement a visual and audial user model. After all, a user can start any app by using his voice, and there are plenty of examples about how to use voice control within an app. Figure 14-3, for example, shows the use of voice control in the Google Search app.
You can use two types of development environments to build your Glassware: the Glass Development Kit (GDK) and the Mirror application programming interface (API).
Google produces the GDK so that you can build your Glassware directly on your Glass — useful if you want to use features such as location, sensors, and voice input. With GDK development, you can do basically the same things that you would on an Android smartphone or tablet, but your app needs to be designed to meet specific Glass user-interface requirements, discussed in “Giving Users What They Want” earlier in this chapter.
If you want to build web-based services that you can use to interact with Glass, use the Mirror API instead. This technology stores your Glassware code on the web so that you don’t need to run the Glass app on Glass. Instead, your web-based service accesses your app code in the cloud and shows its information on the Glass screen.
Google recommends that you use the Mirror API to start developing your Glassware because you can write the code in a variety of programming languages, such as Java, PHP, and .NET.
Start by visiting the Google Developers website to find Quick Start projects in each of the six programming languages that Google uses for the mobile API:
Each website tells you how to access the Quick Start project for that language. For this example, we look at the Quick Start project that shows you how basic functions work in the Mirror API.
Here’s how to find and run the project that tests the Mirror API functionality on Glass:
An OAuth 2.0 permission request screen appears.
This account should be the same account that you use to access Glass.
The timeline items appear on the Glass screen.
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.
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 at http://developer.android.com/sdk/installing/bundle.html.
With that out of the way, here’s how to set up GDK within the ADT bundle window:
The Android SDK Manager window appears.
The ADT bundle installs both items.
To connect your Glass to the GDK, follow these steps:
The DDMS window opens.
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:
The Android Sample Project window appears.
You can choose the Compass, Stopwatch, or Time sample.
You return to the Eclipse app window.
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.
You see the sample Glassware running on the Glass screen.
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 at http://developer.android.com/training/basics/firstapp/index.html. You can also explore the Developers website to see whether the other tutorials on the site strike your fancy.
When you’re satisfied that the Glassware you’ve developed is ready for users, submit it for inspection at the Glassware Distribution page (https://developers.google.com/glass/distribute/index).
Naturally, Google wants all the software it offers in MyGlass to be high-quality. To meet that goal, it requires developers to follow a launch checklist, which includes the following items:
If you’re not intimidated by this partial list, you can read the entire checklist of requirements at https://developers.google.com/glass/distribute/checklist.
52.15.176.80