kable
kable copied to clipboard
Advertisement flow should throw an error if location permission is missing
So I started trying out the library following the readme and noticed that after collecting the advertisements flow, a scanner was registered, as per the log: BluetoothLeScanner: onScannerRegistered() - status=0 scannerId=9 mScannerId=0.
However I wasn't getting any scan record, or advertisement as the library calls it, and wondered whether I was making some mistake.
Turns out I hadn't allowed location permission, but at the same time I wondered whether the library should check for it instead of silently doing nothing. Maybe throw an error if location permission is missing? As it stands, if bluetooth is disabled when collecting the advertisements flow an error is thrown, I'd expect to do the same if location permissions are missing.
What are your thoughts?
That is definitely an oversight, Kable should throw an exception if it does not have the proper permissions.
Thanks for reporting the issue!