Open peitschie opened 2 years ago
Seems there's a bit of history around this behaviour
Any solution here will need to figure out how to determine whether the scan might work or not...
Any updates on this? If global permissions on Android are disabled, no error is thrown from isEnabled() or startScan()
Hi @sam-higgs
Nothing specific yet. The linked discussions above suggest there are some phones out there that are allowed to scan despite the location service being disabled, so I'm reluctant to force it one way or another.
In practice, this is something the application itself can do by checking ble.isLocationEnabled
manually before starting a scan: https://github.com/don/cordova-plugin-ble-central#islocationenabled
But... it's still on my radar!
As per https://github.com/don/cordova-plugin-ble-central/blob/f5569e48262da901ee3b82b81ade3c73c5418f8b/src/android/BLECentralPlugin.java#L712
This should fail the scan callback so the calling app understands that the scanning is not in progress.