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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.