monitorCharacteristicForDevice works fine on IOS but not on Android
See original GitHub issueAttempting to monitor changes and get the listener callback to fire when my hardware notifies the phone.
This code works as expected on IOS but I get no response from the listener on Android.
Followed these docs: https://polidea.github.io/react-native-ble-plx/#BleManager#monitorCharacteristicForDevice
Is there any known difference in functionality between the platforms? I’ve been digging around and logging out data in BleModule.java
to try and get some feedback but I’m not getting anywhere.
Has anyone else had this problem?
These are my versions:
"react-native": "^0.47.0-rc.1", "react-native-ble-plx": "^0.6.3",
The code in question:
let thisSubscription = this.manager.monitorCharacteristicForDevice(this.connectedDevice.id, this.serviceUUID, this.tagCharacteristicUUID, (err, characteristic) => {
// console.log('monitorCharacteristicForDevice fires once');
if(err) {
console.log('Err from pen', err);
return
}
console.log('data from pen: ', characteristic);
let tagValue = utils.base64toHEX(characteristic.value)
console.warn('Tag data: ', tagValue);
})
console.log('thisSubscription', thisSubscription);`
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:19 (5 by maintainers)
Top Results From Across the Web
monitorCharacteristicForDevice works fine on IOS but not on ...
Attempting to monitor changes and get the listener callback to fire when my hardware notifies the phone. This code works as expected on...
Read more >RxBLELibraries/react-native-ble - Gitter
Hello all ! My team and I are going to create a bluetooth app for android and ios with React-Native. I was wandering...
Read more >react-native-ble-plx 2.0.2 | Documentation
Characteristic is a container for a value which can be read, written and monitored based on available capabilities. For example connection may look...
Read more >Highest scored 'react-native-ble-plx' questions - Page 2
I am trying to pair a gateway to React native app using the react-native-ble-plx. The below source code works fine in Android wheras...
Read more >react-native-ble-plx - npm
... data type on Android. Don't emit state changes when BLE is not supported. ... Both on iOS and Android continue manually from...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In version 0.8.0 I created a workaround, which caused some issues on our side. That’s why I reverted it. I think that this should be fixed in RxAndroidBle directly and probably will look into it on Friday (my open source days).
Sit tight, I am currently working on the solution 😉