In order to enable background location access, users must set the Allow all the time option for your app’s location permission on a settings page , as described in the guide on how to Request background location.
Read moreWhat permissions are needed for location Android?
Android offers two location permissions: ACCESS_COARSE_LOCATION and ACCESS_FINE_LOCATION . The permission you choose determines the accuracy of the location returned by the API. You only need to request one of the Android location permissions, depending on the level of accuracy you need: android.
Read moreHow do I ask for location permissions on Android?
Learn how an app can use your phone’s location
Read more