Detecting on Android if the OS bluetooth is on or off
-
Our developer, that is implementing the Flic2 library for our App, told us that in your API there is no way to detect, on opening the library, if the system bluetooth is on or off and, consequently, advise the User.
While we solved that on iOS, I would like to know if there is a way, in the Android API, to do this.
As you can image, having the bluetooth off without knowing it, the user may think that is the App that doesn’t work and we have no mean of how to advise him of this fact.
Thanks
-
Hi, just use this method: https://developer.android.com/reference/android/bluetooth/BluetoothAdapter#isEnabled(). Or use https://developer.android.com/reference/android/bluetooth/BluetoothAdapter#ACTION_STATE_CHANGED to listen to state changes.