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
Get Programming Google Glass now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.