33 Locations and Play Services

In this chapter, you will start writing a new app called Locatr that performs a Flickr geosearch. It will ask for runtime permission to find your current location, and then it will use that location to look for pictures nearby (Figure 33.1). Then, in the next chapter, you will show the picture on a map.

Figure 33.1  Locatr at the end of this chapter

Screenshot shows Locator app in Android phone. The Locator app screen shows the photo of a man wearing spectacles placed at the center.

It turns out that this simple job – finding your current location – is more interesting than you might expect. It requires integrating with Google’s set of libraries that live outside the standard library set, called Google Play Services.

Get Android Programming: The Big Nerd Ranch Guide, Third Edition 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.