Chapter 5
Tracking Movement and User Responses

Everything we’ve done so far has been about presenting options to users. They authorize the app, and we show them cards and present menu items to them. This chapter is about what users don’t see but they interact with for a deeper experience. These are back-end services that are affected by changes in a user’s Glass state.

Back-end services in response to state changes are a common fixture in software applications. Imagine a case where you might consistently delete emails from the same address. With the subscription service, your Glassware can register to receive a notification of any timeline-item deletions. If a user deletes three emails from a given sender, that address is added to a spam list, which suppresses further timeline items added for that email address. Or, if you don’t want your application to be so subtle, you can create a custom Spam menu item and subscribe to that, allowing users to be a bit more proactive. We’ll take advantage of this behavior to create our own custom Lunch Roulette menu item.

With the location service you can get the current and past position of a Glass device. There are untold uses for geolocation. In our case, we’ll use the latest location to find restaurants in the local area, and display a real nearby restaurant on the Lunch Roulette card with the help of Google Places. Just to show off maps a bit, we’ll also display the location of the restaurant on a card.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.100.202