O'Reilly logo

Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android by Michael Eierman, Jakob Iversen

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

Finding Your Location

Finding a location can be performed in two ways. The first involves using the device network and/or GPS sensors to locate the device in real-time. The second uses a known location (for example, an address) and looks up the GPS coordinates via the Internet. Both approaches will be demonstrated. When working with maps, you can use the map’s getMyLocation() method to get the device’s current GPS coordinates. If you need to get location without using a map, there is more work involved. In this section, you build and test several versions of ContactMapActivity to learn different approaches to getting location before building the final one used for the app.

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