Chapter 9. Location-Based Services
WHAT YOU WILL LEARN IN THIS CHAPTER
How to display Google Maps in your Android application
How to display the zoom controls on the map
How to switch between the different map views
How to add markers to maps
How to get the address location touched on the map
How to perform geocoding and reverse geocoding
How to obtain geographical data using GPS, Cell-ID, and Wi-Fi triangulation
How to monitor for a location
We have all seen the explosive growth of mobile apps in recent years. One category of apps that is very popular is location-based services, commonly known as LBS. LBS apps track your location, and may offer additional services such as locating amenities nearby, as well as offering suggestions for route planning, and so on. Of course, one of the key ingredients in a LBS app is maps, which present a visual representation of your location.
In this chapter, you will learn how to make use of the Google Maps in your Android application, and how to manipulate it programmatically. In addition, you will learn how to obtain your geographical location using the LocationManager
class available in the Android SDK.
DISPLAYING MAPS
Google Maps is one of the many applications bundled with the Android platform. In addition to simply using the Maps application, you can also embed it into your own applications and make it do some very cool things. This section describes how to use Google Maps in your Android applications and programmatically perform the following:
Change ...
Get Beginning Android™ Application Development 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.