question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

startNotification does not called

See original GitHub issue
  • react-native-ble-manager v6.2.9
  • react-native v0.55.2
  • iOS/Android v4.4

I have problem with older Android devices. On Android 7.1 everything works fine, but on devices under version 6 startNotification() method is not called.

BleManager.connect(peripheral.id).then(() => { console.log('Connected'); BleManager.retrieveServices(peripheral.id).then((device) => { console.log(device); BleManager.startNotification(device.id, device.characteristics[5].service, device.characteristics[5].characteristic).then((res) => { // Success code console.log('Notification started');
}) .catch((error) => { // Failure code console.log(error); }) .catch((e) => console.log(e)); }) .catch((e) => console.log(e));

In console log I don’t see either the successful or the failed log. But it successful connect and retrieve services.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
gregogalantecommented, Jun 4, 2018

Get same problem

0reactions
kgasparcommented, Dec 8, 2018

@gregogalante

Yeah they introduced that in Android 6.0. to protect the users privacy. As stated in Android Developer

To scan the user needs to allow coarse location services.

But I think startNotification is not related to this. Since this is an 5.0 Android issue, and is related to not getting a notification started callback.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ble.startNotification not working with Android 9 or above #815
I have the startNotification successfully working with 2 devices implementing BLE 4.1 and 4.2 on Android 8.1 platform.
Read more >
Bluetooth LE startNotification not working - Ionic Framework
When I do a ble.read() it works, but ble.startNotification() does not. Do you know why? Phone is a Galaxy S6. Peripheral is a...
Read more >
Ionic BLE central startNotification not firing custom callbacks
In my understanding this shows, that receiving the notifications works and fires up an event, but my custom callback is somehow ignored. Does ......
Read more >
BluetoothRemoteGATTCharacter...
BluetoothRemoteGATTCharacteristic.startNotifications(). Experimental: This is an experimental technology. Check the Browser compatibility table ...
Read more >
Schedule Start Notification - Atlassian Community
Our on-call schedule rotates at midnight. ... This does not work - we are not getting notified for schedule start. Any suggestions?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found