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

subscribeOnPeersUpdates doesn't fire at all it doesn't show me the connected devices Test on Android 10 #45

Open
Rananjaya opened this issue Jan 21, 2021 · 3 comments

Comments

@Rananjaya
Copy link

subscribeOnPeersUpdates doesn't fire at all it doesn't show me the connected devices on Android 10

async componentDidMount() {
try {

      await initialize();
      // since it's required in Android >= 6.0
      const granted = await PermissionsAndroid.request(
        PermissionsAndroid.PERMISSIONS.ACCESS_FINE_LOCATION,
          {
              'title': 'Access to wi-fi P2P mode',
              'message': 'ACCESS_COARSE_LOCATION'
          }
      )

      console.log(granted === PermissionsAndroid.RESULTS.GRANTED ? "You can use the p2p mode" : "Permission denied: p2p mode will not work");
       console.log("inside")
      subscribeOnPeersUpdates(this.handleNewPeers);
      subscribeOnConnectionInfoUpdates(this.handleNewInfo);
      subscribeOnThisDeviceChanged(this.handleThisDeviceChanged);

      const status = await startDiscoveringPeers();
      console.log('startDiscoveringPeers >>>>>>>>: ', status);
  } catch (e) {
      console.error("error >>>>",e);
  }

}

@kirillzyusko
Copy link
Owner

kirillzyusko commented Jan 21, 2021

Hi @Rananjaya
Did you follow caveats instructions?

@Rananjaya
Copy link
Author

Rananjaya commented Jan 25, 2021

Hi @kirillzyusko Yes I followed caveats instructions. and also this error came -

error >>>> {"code": 2, "message": "Operation failed because the framework is busy and unable to service the request.

@kirillzyusko
Copy link
Owner

@Rananjaya could you attach logs from adb logcat?

But basically it's not a problem of this package. It's system code, so I think something is wrong with setup. So, please, provide logs :)

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