Chapter 10. Location is everything
In this chapter
- Using latitude and longitude
- Finding the user’s current location
- Building a map-based application
There isn’t a parallel of latitude but thinks it would have been the equator if it had had its rights.
Mark Twain
One of the biggest factors in the appeal of smartphones is their location-awareness. It’s incredible to have a device you carry around in your pocket that can tell you exactly where you are on the planet. Thanks to brilliant engineers, science fiction is now reality. Yet, modern mobile devices take the wonder even further. Beyond pinpointing location, they provide access to a worldwide web of data, device sensors, and a market of inventions and ideas.
Developers have used Android’s location capabilities to create many ingenious applications. Among them are applications that enable other phone functions based on where you are at a certain time; help you track activities when hiking, biking, or running; tell you when interesting attractions and services are nearby and where they’re located; allow you to track your device remotely if it’s lost or misplaced; calculate current speed and other metrics; enable more precise data for ads and other commercial uses; and more.