public enum AdapterState

  1. Object
  2. Enum<AdapterState>
  3. 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

UNKNOWNThe state has not been determined yet – e.g. iOS before the first CoreBluetooth manager callback fired.
UNSUPPORTEDThe device has no Bluetooth hardware, or the port does not implement Bluetooth at all.
UNAUTHORIZEDThe app is not authorized to use Bluetooth (iOS privacy authorization denied / restricted, or missing runtime permissions on Android).
POWERED_OFFThe adapter is off.
TURNING_ONThe adapter is transitioning to POWERED_ON (Android only; iOS reports the transition as a direct state change).
POWERED_ONThe adapter is on and ready for scanning, connections and advertising.
TURNING_OFFThe 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

UNKNOWN
The state has not been determined yet – e.g. iOS before the first CoreBluetooth manager callback fired.

UNSUPPORTED

UNSUPPORTED
The device has no Bluetooth hardware, or the port does not implement Bluetooth at all. The fallback base Bluetooth class always reports this state.

UNAUTHORIZED

UNAUTHORIZED
The app is not authorized to use Bluetooth (iOS privacy authorization denied / restricted, or missing runtime permissions on Android).

POWERED_OFF

POWERED_OFF
The adapter is off. Ask the user to enable it, optionally via Bluetooth.requestEnable().

TURNING_ON

TURNING_ON
The adapter is transitioning to POWERED_ON (Android only; iOS reports the transition as a direct state change).

POWERED_ON

POWERED_ON
The adapter is on and ready for scanning, connections and advertising.

TURNING_OFF

TURNING_OFF
The adapter is transitioning to POWERED_OFF (Android only).

Method details

values

public static AdapterState[] values()

valueOf

public static AdapterState valueOf(String name)