ProviderChangeEventΒΆ
classProviderChangeEvent
Location-services provider state delivered to BGGeo.onProviderChange.
The SDK fires this event when the user changes location permissions, toggles device location settings, or β on iOS 14 and later β when the precision authorization level changes between full and reduced accuracy.
val bgGeo = BGGeo.instance
bgGeo.onProviderChange { event ->
Log.d(TAG, "[onProviderChange] enabled: ${event.enabled} status: ${event.status} gps: ${event.gps} network: ${event.network} accuracyAuthorization: ${event.accuracyAuthorization}")
if (!event.enabled) {
// Prompt the user to re-enable location services.
}
}
MembersΒΆ
accuracyAuthorizationΒΆ
val accuracyAuthorization: Int
Precision location authorization level. Use the AccuracyAuthorization constants to interpret this value.
On iOS 14 and later this reflects whether the user has granted full or
reduced accuracy. On Android this value is always
AccuracyAuthorization.Full.
enabledΒΆ
true when the device has at least one location provider enabled.
gpsΒΆ
true when the GPS-based location provider is available.
networkΒΆ
true when the network-based location provider is available.
statusΒΆ
Platform authorization status code. Use the PermissionStatus constants to interpret this value.