public enum AdapterState
- Object
- Enum<AdapterState>
- AdapterState
ImplementsComparable<AdapterState>
Lifecycle states of the local Bluetooth adapter, a union of the Android
BluetoothAdapter states and the iOS CBManagerState values. Query via
Bluetooth.getAdapterState() and observe changes with
Bluetooth.addAdapterStateListener(AdapterStateListener).Enum constants
UNKNOWN | The state has not been determined yet – e.g. iOS before the first CoreBluetooth manager callback fired. |
UNSUPPORTED | The device has no Bluetooth hardware, or the port does not implement Bluetooth at all. |
UNAUTHORIZED | The app is not authorized to use Bluetooth (iOS privacy authorization denied / restricted, or missing runtime permissions on Android). |
POWERED_OFF | The adapter is off. |
TURNING_ON | The adapter is transitioning to POWERED_ON (Android only; iOS reports the transition as a direct state change). |
POWERED_ON | The adapter is on and ready for scanning, connections and advertising. |
TURNING_OFF | The adapter is transitioning to POWERED_OFF (Android only). |
Methods
public static AdapterState[] values() | |
public static AdapterState valueOf(String name) |
Inherited methods
Enum constant details
UNKNOWN
UNKNOWNThe state has not been determined yet – e.g. iOS before the first
CoreBluetooth manager callback fired.
UNSUPPORTED
UNSUPPORTEDThe device has no Bluetooth hardware, or the port does not implement
Bluetooth at all. The fallback base
Bluetooth class always reports
this state.UNAUTHORIZED
UNAUTHORIZEDThe app is not authorized to use Bluetooth (iOS privacy authorization
denied / restricted, or missing runtime permissions on Android).
POWERED_OFF
POWERED_OFFThe adapter is off. Ask the user to enable it, optionally via
Bluetooth.requestEnable().TURNING_ON
TURNING_ONThe adapter is transitioning to
POWERED_ON (Android only; iOS
reports the transition as a direct state change).POWERED_ON
POWERED_ONThe adapter is on and ready for scanning, connections and
advertising.
TURNING_OFF
TURNING_OFFThe adapter is transitioning to
POWERED_OFF (Android only).Method details
values
public static AdapterState[] values()valueOf
public static AdapterState valueOf(String name)