In this course, you will learn to create apps that run directly on Google Glass by creating a full-featured Scavenger Hunt game using the Glass Development Kit. The course takes you through the complete process of building a Scavenger Hunt game that runs entirely on Google Glass. In the process of creating this game, you will learn how to develop apps for Google Glass that interact with the Glass Timeline and incorporate the distinct behaviors of a wearable computer like Google Glass, including using voice commands to launch your app, capturing photos, and incorporating touch-based-gestures for navigation. In this game, the player uses the built-in camera to capture photos corresponding to a randomly generated list of Scavenger Hunt categories. As each photo is captured, the player uses touch-based-gesture navigation to associate the photo with the appropriate category. The game uses a Google Glass LiveCard to display the player's ongoing game status on the Glass Timeline with game play continuing until the player has captured a photo for every category.
Jim Wilson is president of JW Hedgehog, Inc., a consulting firm specializing in solutions for the Android, iOS, and Microsoft platforms. Jim has over 30 years of software engineering experience, with the past 15 years heavily focused on creating mobile device and location-based solutions.
Creating Scavenger Hunt for Glass Welcome to the Creating Scavenger Hunt for Glass module. My name is Jim Wilson. In this module we're going to get started in creating our Glass application. We're going to actually start right from the very beginning right from scratch. So, the first one we'll have to look at is what do we have to do to create a new project and have it work correctly with Glass? And one of the key things we'll look at there is how do we configure the project build settings so we can take advantage of the extended classes that exist for building Glass applications. We'll then look at how we build a service that's going to manage our LiveCard because that's a key part of it is that we're putting a LiveCard into the timeline so we keep part of our game. So, that service that we create is going to really be kind of the hub of our application. We'll then look at how that service actually interacts with the Glass timeline to put the LiveCard out there and display the information on it. And then finally we'll look at how do we actually get our app hooked into the 'OK Glass' menu. So, when the user is wearing their Glass device and they want to interact with our application, when they say ok glass how do we kind of come up and get hooked into all that?
Adding Interactivity to Glass Welcome to this module on Adding Interactivity to Glass. My name is Jim Wilson. So, throughout this module we'll be adding interactivity to our application primarily by adding a menu to the LiveCard or at least what appears to be to the LiveCard. The key part of doing that is going to require that we create a transparent activity that overlays our LiveCard and handles all the work of actually displaying and interacting with the menu. So, throughout this module we'll go through that in steps. So, the first thing we'll look at is how do we actually create this activity that's responsible for displaying the menu over the LiveCard, but creating the illusion that it's actually part of the LiveCard? We'll then dig into how we actually manage the menu state throughout that activity. There are a number of things that have to happen in terms of automatically opening the menu when the activity is shown, automatically shutting down the activity when the menu closes, so we'll deal with all those issues. We'll then get into adding the actual menu handling. We'll see that this is very familiar if you've actually worked in Android at all before. We're just going to do some standard menu handling work there. We'll then start to add some of the gaming behavior to our application, so we'll bring in some classes that manage our gaming state, and we call that the game manager, and we'll get that all hooked into our application and tied into some of the menu options. And then the last thing we have to do is if we're going to present this illusion that the menu is tied to the LiveCard what we actually need to do is take the MenuActivity and associate that with the LiveCard, so we'll see how to do that.
Managing Photo Capture on Glass Welcome to this module on Managing Photo Capture on Glass. My name is Jim Wilson. So, throughout this module we're going to see how we add the ability to basically capture photos in our application, so how we actually initiate that process, how do we actually harvest the results. Alright, so we're going to break this into kind of three parts. The first thing we'll look at is how do we actually take the picture? How do we initiate that process of presenting an image to the user for them to accept or reject? Once the user accepts the picture, how do we find out what they've selected? How do we find out the file name associated with the image that they selected? As we'll see, we can get a full resolution image or just a thumbnail of that image. And one of the things we have to think about is that there are some special considerations in terms of activity lifetime, is that there's a close association between a lifetime of our menu activity that starts the photo process and then getting those results back, so it's some special handling we have to add to our menu activity so we can actually harvest the results of the photo that the user captures within our application.
Creating a CardScrollAdapter Welcome to this module on Creating a CardScrollAdaptor. My name is Jim Wilson. In order to create a card scrolling effect within our application, in other words not in a timeline, but in our application itself, we have to construct in something called a CardScrollAdaptor that feeds data into the viewing system for this scrolling experience for the user. So, in order to do that there are a few steps we have to follow. The first thing we have to do is actually create our own CardScrollAdaptor, so we're going to create our own class that inherits from the base class CardScrollAdaptor and to provide our functionality inside of there. Now, one of the kinds of housekeeping jobs that a scroll adapter is responsible for is to manage the underlying content. In our case that's going to be the categories that the user is interacting with. So, that's things like how many items there are, positioning information, and that sort of thing. But now the key thing that goes on in a CardScrollAdaptor though is constructing the individual card views. So, we actually have to inflate a layout and then we'll push our data inside of that and then pass that into the system to be displayed to the user.
Bringing the Scavenger Hunt for Glass Game Features Together Welcome to this module on Bringing the Scavenger Hunt for Glass Game Features Together. My name is Jim Wilson. So, here we are at the last part of our course in terms of building our application, and what we really want to do is kind of just kind of add these final features to our game so it provides a really kind of intuitive and clean experience to the user. So, one of the things we're going to do is implement the ability to view categories, and the thing we're really looking at there is just provide the user with the ability to kind of evaluate the state of the game to see what's going on inside of there. Now, one of the key things we'll do is that we're going to actually update our service so that the LiveCard display values can be updated throughout the life of our application. So, as the state of the game begins to change, the users can constantly within a timecard see the things that are changing that go along with the app. Now, as part of updating the service itself to support modifying the LiveCard throughout the application we also want to provide the ability for other parts of the application to let the service know that we need to have the LiveCard updated, so we'll add those features in. And the last thing we'll do is kind of finalize the game state, so things like how do the applications start up in a place that's very intuitive for the user as they begin things, getting menus out of the way that the user is not going to use at certain points in the game, so make the game kind of transition its state correctly, and it also just makes things easy and natural for the user.