Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setMethodCallHandler never run? #61

Open
barangungor opened this issue Mar 7, 2022 · 1 comment
Open

setMethodCallHandler never run? #61

barangungor opened this issue Mar 7, 2022 · 1 comment

Comments

@barangungor
Copy link

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!");
        }
      });
    } 
@francescovallone
Copy link

Hello,

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants