| layout | page |
|---|---|
| title | 401.39 Reading Notes |
| permalink | /401-R39/ |
-
The Google Play Services library allows for integrating device information into code. Much of this functionality requires permission requests -- like requests for access to location tracking (via GPS or Wi-Fi scans).
LocationRequestobjects allow for adjusting the frequency and precision of these requests (parameters found here). -
The
FusedLocationProviderClientclass allows access to device location information and related methods. ThegetLastLocation()method in particular fetches a cached location from the device (compared togetCurrentLocation(), which makes a new check for the device location). This method can return null in multiple cases (user settings changes can wipe the last cached location).