Closed MarkBlythe closed 5 years ago
Hi, you have to debug directly on your device, also try other smarphone with different android version.
After some more testing I realised it is because in Android you need to pair the device externally before trying to gather data from it.
iOS handles the pairing automatically in the connect method but there is no similar behaviour for Android devices.
In summary, to be able to connect and read / receive data from Android devices the peripheral must already be paired with the device outside of your application.
Version
Tell us which versions you are using:
Expected behaviour
Actual behaviour
iOS works perfectly as described above. Android devices can connect and retrieve services but
BleManager.startNotification
doesn't seem to be doing anything.Steps to reproduce
Update handler set in componentDidMount
this.handlerUpdate = bleManagerEmitter.addListener('BleManagerDidUpdateValueForCharacteristic', this.handleUpdateValueForCharacteristic);
Perform a scan of bluetooth devices (This works properly)
Connect and start notification
BleManagerDidUpdateValueForCharacteristic
which is never called.Stack trace and console log
This is the characteristic in question:
characteristic: "2a35" descriptors: [{…}] properties: {Indicate: "Indicate"} service: "1810"
Notification started for Service: 1810 and characteristic: 2a35
Disconnected from B0:49:5F:02:AA:4D