-
Notifications
You must be signed in to change notification settings - Fork 451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IllegalStateException when starting monitoring on SDK 0.9.6 #137
Comments
My guess: something is wrong with public boolean isBluetoothEnabled() {
BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
return adapter != null && adapter.isEnabled();
} I cannot guarantee, it's the right solution and if will work on any device and Android API, but I think it should and you can try. In the code snippet above, |
- Packet parser errors are logged and should not crash whole application. - Fixed threading issue that cause scanning to continue when service was stopped (on some devices). - onExitRegion should be now working on devices with pre-Lollipop Androids. - Fixed (#135): Fails getting RSSI on Android >=5.0 (Samsung Galaxies) - Fixed (#137): IllegalStateException when starting monitoring on SDK 0.9.6
Actually it is the new behavior of BluetoothLeScanner that throws an exception when state of BluetoothAdapter is not on (adapter may be enabled but it is not turned on). Old scanning API just returned false, new one crashes an app. It should be fixed in SDK 0.9.7. |
- Packet parser errors are logged and should not crash whole application. - Fixed threading issue that cause scanning to continue when service was stopped (on some devices). - onExitRegion should be now working on devices with pre-Lollipop Androids. - Fixed (#135): Fails getting RSSI on Android >=5.0 (Samsung Galaxies) - Fixed (#137): IllegalStateException when starting monitoring on SDK 0.9.6
After upgrade to 0.9.7 the issue still happens:
|
Hi,
after update from 0.8.8 to 0.9.6 we were starting getting this exception:
And the code for starting monitoring looks like:
Any idea on what is the cause?
The text was updated successfully, but these errors were encountered: