Open tempestwf opened 6 years ago
Updating with more exact info about the issue.
We were able to solve this problem. It turns out that https://github.com/randdusing/cordova-plugin-bluetoothle#requestpermission must be called when the application is packaged into an APK. It's not an issue when using ionic cordova run android, however.
Not sure why there is a difference, but that is the fix.
You may have previously allowed permission when using ionic run, and then when you deployed the release apk, it may require permissions to be requested.
Thanks Rand
The problem doesn't seem to be happening any more. We made some major changes to our implementation of the plugin, and this and some other issues went away.
All the best
Will
On Sat, Jun 23, 2018 at 9:43 AM, Rand Dusing notifications@github.com wrote:
You may have previously allowed permission when using ionic run, and then when you deployed the release apk, it may require permissions to be requested.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/randdusing/cordova-plugin-bluetoothle/issues/488#issuecomment-399691998, or mute the thread https://github.com/notifications/unsubscribe-auth/AaH3bbmyVRAsf6LgaLI6C2kBoPVlXvAuks5t_nAngaJpZM4UqryR .
Hi
The plugin is working perfectly when running:
To deploy to a device from my computer.
However, if we run:
To make an APK, and then when we install the APK scanning happens just fine (from startScan method we get
status: scanStarted
), but no device is ever discovered ( we never get:status:scanResult
).I should also note that the standard BLE plugin (cordova-plugin-ble-central) is able to discover devices when in an APK. However, that plugin has its own issues that have made it not viable for us to use.
Has anyone encountered this before or has any suggestions?
I am testing on a Samsung Galaxy A Tablet with Android Version 7.0.
We are building our application in Ionic. Here are some entries from package.json so you can see what versions we are running:
Thanks very much.
Will