accuracyAuthorization property

int accuracyAuthorization
getter/setter pair

[Precise: On] switch on the location authorization dialog allowing users to disable high-accuracy location.

This attribute shows the state of that switch:

Example

BackgroundGeolocation.onProviderChange((ProviderChangeEvent event) {
  int authorizationStatus = event.authorizationStatus;
  if (authorizationStatus == ProviderChangeEvent.ACCURACY_AUTHORIZATION_REDUCED) {
    BackgroundGeolocaiton.requestTemporaryFullAccuracy("MyPurposeString").then((int accuracyAuthorization) {
      print("RESULT:  $accuracyAuthorization");
    }).catchError((error) {
      print("ERROR:  Failed to show dialog: $error");
    });
  }
});

See also:

Implementation

late int accuracyAuthorization;