Skip to content

Latest commit

 

History

History
13 lines (9 loc) · 921 Bytes

File metadata and controls

13 lines (9 loc) · 921 Bytes
layout page
title 401.39 Reading Notes
permalink /401-R39/

Locations

Google Play Location API

  • 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). LocationRequest objects allow for adjusting the frequency and precision of these requests (parameters found here).

  • The FusedLocationProviderClient class allows access to device location information and related methods. The getLastLocation() method in particular fetches a cached location from the device (compared to getCurrentLocation(), 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).