simple_beacons_flutter icon indicating copy to clipboard operation
simple_beacons_flutter copied to clipboard

setMethodCallHandler never run?

Open barangungor opened this issue 2 years ago • 1 comments

I want scan beacon devices, wrote the code like example code but i only see 2. print in my console. I can't see 3. print and can't startMonitoring.

    if (Platform.isAndroid) {
      //Prominent disclosure
      print('HELLO ANDROID');
      await BeaconsPlugin.setDisclosureDialogMessage(
              title: "Title",
              message:
                  "Message")
          .then((value) {
        print('HELLO ANDROID 2');
      });
      // await BeaconsPlugin.clearDisclosureDialogShowFlag(false);
      BeaconsPlugin.channel.setMethodCallHandler((call) async {
        print("Method: ${call.method}");
        if (call.method == 'scannerReady') {
          await BeaconsPlugin.startMonitoring();
        } else if (call.method == 'isPermissionDialogShown') {
          print("Prominent disclosure message is shown to the user!");
        }
      });
    } 

barangungor avatar Mar 07 '22 14:03 barangungor

Hello,

Same problem here running the example app. It never print print("Method: ${call.method}"); so it looks like it's not working properly

francescovallone avatar Sep 16 '22 10:09 francescovallone