O'Reilly logo

Programming Google Glass by Eric Redmond

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Location

With a location in hand, we can optionally display the location in a map by using a glass://map path, or provide a menu option to get directions from where a user currently is to a destination. The next two sections are examples of what you can do with a Glass’s location. There are innumerably more.

Navigating to a Location

Now that you have the location of your Glass user, why not expand Lunch Roulette a bit? Rather than presenting the user with a random cuisine, you can use her location along with a map service like Yelp or Google Places to present the local restaurants.

The code necessary to search Google Places for a nearby cuisine is wrapped up into a PlaceUtils class as part of the book’s downloadable code. The getRandom

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required