umair13adil / simple_beacons_flutter

A flutter plugin project to range & monitor iBeacons.
Apache License 2.0
35 stars 42 forks source link

Deactivate Permission Request #55

Closed mherfurt closed 2 years ago

mherfurt commented 2 years ago

I am developing an app, that uses an introduction screen for the "prominent disclosure" needed for the background location permission on android. Now, every time when the app is newly installed on my device, a permission prompt pops up, even when the beacons-process has not been started.

It would be great to tell plugin to not ask for the permission itself. Would this be possible?

umair13adil commented 2 years ago

This is handled in version 2.0.4.

You can do this like this where ever you want to invoke:

     await BeaconsPlugin.setDisclosureDialogMessage(
          title: "Tile for message",
          message: "Message");

      BeaconsPlugin.channel.setMethodCallHandler((call) async {
        if (call.method == 'isPermissionDialogShown') {
           //Called when dialog has been shown
        }
      });