cordova-plugin-ble-central
cordova-plugin-ble-central copied to clipboard
startNotification not returning any result for API level 33 (Pixel devices)
I have app which is running fine on 80% of devices but Google Pixel devices and Nokia devices (either Android 12 or 13 or 14), when connect is called, it is asking for Call History permission which is triggering Negative image for the app to the end users.
Also, The startNotification function doesn't provide any response and do nothing on these devices. The function neither returning error no returning Success callback.
Let me know can be done to avoid this Extra permission message and why I am not getting anything for startNotification function.
The Call History prompt something Android does itself as part of the bonding process. A reasonable overview of this process is recorded here: https://medium.com/@futail2a/why-android-requests-contacts-and-call-history-during-ble-pairing-deb2032c64f5
A few questions:
- I presume you have some encrypted characteristics on your Bluetooth device? If not, the first question is why you're getting a pairing request at all
- Does
startNotificationwork if you call it after the pairing dialog is accepted?
This is unlikely to be anything related to this plugin however, as what you're running into is native Android behaviour that they don't expose APIs to control.
Thanks @peitschie for prompt response. Here is answer for your queries.
- When I call the
startNotificationthat time the permission popup is shown and it ask for Pairing. I am not callingpairfunction anywhere. - After accepting pair request, nothing happen as I am not getting anything inside
successorerrorcallback.
I think the broadcast listener is not triggering any even for intent to send data back to callback function.