-
Notifications
You must be signed in to change notification settings - Fork 35
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
android discovery not working #46
Comments
This is how I personally go about it: BluetoothCP.advertise();
// BluetoothCP.browse();
BluetoothCP.addPeerDetectedListener(function(user) {
if (typeof user !== 'undefined' && user !== null) {
BluetoothCP.inviteUser(user.id);
self.props.dispatch(SessionStateActions.addUser());
}
});
BluetoothCP.addPeerLostListener(function(user) {
self.setState({usersNumber: self.state.usersNumber - 1});
if (typeof user !== 'undefined' && user !== null) {
BluetoothCP.disconnectFromPeer(user.id);
self.props.dispatch(SessionStateActions.removeUser());
}
});
BluetoothCP.addInviteListener(function(user) {
if (typeof user !== 'undefined' && user !== null) {
BluetoothCP.acceptInvitation(user.id);
}
}); I have to check the user object because sometimes it would return an |
@virl I am also facing the same issue. I am using android 8 and only when wifi is turned on (But no internet) along bluetooth only then discovery works. It is not working only with bluetooth alone. Previously only bluetooth was working fine on android versions below 8. Is there any specific handling to be done for devices above Android 7. Kindly clarify. |
@vimalathiyagu Currently Bluetooth discovery and communication are not supported when both devices are Android 8+. |
Thanks @virl |
@virl will bluetooth be working again anytime soon? |
hey @virl is there any update on 8+ versions issue? |
I have set up a project in react-native and am trying to locate peers and advertise via bluetooth but when i getNearbyPeers the array returned is always empty. Are there any examples of how this is supposed to work?
The text was updated successfully, but these errors were encountered: