Learning Mobile App Development: A Hands-on Guide to Building Apps with iOS and Android
by Jakob Iversen, Michael Eierman
Location Sensors
Android devices typically have two location sensors. One sensor (network sensor) is based on the cell towers and/or the Wi-Fi access points your device is connected to. This sensor provides the approximate location of the device. The other sensor is based on a built-in Global Positioning System (GPS) receiver. This sensor can provide position information accurate to within a few meters, depending on conditions. However, the GPS sensor is much slower in acquiring its position information than the network sensor. Additionally, not all devices have a GPS sensor.
Location information is accessed within an app through the use of the LocationManager object. A LocationManager is not directly instantiated. It exists as an Android system ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access