FusedLocationProvider
A location provider backed by Huawei Mobile Services fused location.
Each collection requests fused updates, emits the last location when one exists, and removes its callback when collection ends. Every update request explicitly selects LocationRequest.COORDINATE_TYPE_WGS84, which is the coordinate system that MapLibre expects.
LocationAccuracy.BestForNavigation and LocationAccuracy.High map to LocationRequest.PRIORITY_HIGH_ACCURACY, LocationAccuracy.Balanced maps to LocationRequest.PRIORITY_BALANCED_POWER_ACCURACY, LocationAccuracy.Low maps to LocationRequest.PRIORITY_LOW_POWER, and LocationAccuracy.Lowest maps to LocationRequest.PRIORITY_NO_POWER.
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.