FusedLocationProvider
A location provider backed by Google Play Services fused location.
Each collection requests fused updates, emits the last location when one exists, and removes its callback when collection ends.
LocationAccuracy.BestForNavigation and LocationAccuracy.High map to Priority.PRIORITY_HIGH_ACCURACY, LocationAccuracy.Balanced maps to Priority.PRIORITY_BALANCED_POWER_ACCURACY, LocationAccuracy.Low maps to Priority.PRIORITY_LOW_POWER, and LocationAccuracy.Lowest maps to Priority.PRIORITY_PASSIVE.
LocationAvailability.isLocationAvailable equal to false maps to LocationUnavailableReason.TemporarilyUnavailable. A SecurityException maps to LocationUnavailableReason.PermissionDenied. Other exceptions escape the flow, and the collector classifies them as LocationUnavailableReason.UnexpectedFailure.
The Context constructor delegates permission and requestPermission to an AndroidLocationProvider. The FusedLocationProviderClient constructor keeps the default LocationProvider.permission, which is always granted, and its updates still surface a SecurityException as LocationUnavailableReason.PermissionDenied.
Constructors
Creates a provider backed by locationClient.
Creates a provider with its own fused client and an AndroidLocationProvider as its permission delegate.