BluetoothStatusCodes


public final class BluetoothStatusCodes
extends Object

java.lang.Object
   ↳ android.bluetooth.BluetoothStatusCodes


A class with constants representing possible return values for Bluetooth APIs. General return values occupy the range 0 to 199. Profile-specific return values occupy the range 200-999. API-specific return values start at 1000. The exception to this is the "UNKNOWN" error code which occupies the max integer value.

Summary

Constants

int ERROR_BLUETOOTH_NOT_ALLOWED

Error code indicating that the API call was initiated by neither the system nor the active user.

int ERROR_BLUETOOTH_NOT_ENABLED

Error code indicating that Bluetooth is not enabled.

int ERROR_DEVICE_NOT_BONDED

Error code indicating that the Bluetooth Device specified is not bonded.

int ERROR_GATT_WRITE_NOT_ALLOWED

A GATT writeCharacteristic request is not permitted on the remote device.

int ERROR_GATT_WRITE_REQUEST_BUSY

A GATT writeCharacteristic request is issued to a busy remote device.

int ERROR_MISSING_BLUETOOTH_CONNECT_PERMISSION

Error code indicating that the caller does not have the Manifest.permission.BLUETOOTH_CONNECT permission.

int ERROR_PROFILE_SERVICE_NOT_BOUND

Error code indicating that the profile service is not bound.

int ERROR_UNKNOWN

Indicates that an unknown error has occurred.

int FEATURE_NOT_CONFIGURED

Indicates that the feature status is not configured yet.

int FEATURE_NOT_SUPPORTED

Indicates that the feature is not supported.

int FEATURE_SUPPORTED

Indicates that the feature is supported.

int SUCCESS

Indicates that the API call was successful.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Constants

ERROR_BLUETOOTH_NOT_ALLOWED

Added in API level 31
public static final int ERROR_BLUETOOTH_NOT_ALLOWED

Error code indicating that the API call was initiated by neither the system nor the active user.

Constant Value: 2 (0x00000002)

ERROR_BLUETOOTH_NOT_ENABLED

Added in API level 31
public static final int ERROR_BLUETOOTH_NOT_ENABLED

Error code indicating that Bluetooth is not enabled.

Constant Value: 1 (0x00000001)

ERROR_DEVICE_NOT_BONDED

Added in API level 31
public static final int ERROR_DEVICE_NOT_BONDED

Error code indicating that the Bluetooth Device specified is not bonded.

Constant Value: 3 (0x00000003)

ERROR_GATT_WRITE_NOT_ALLOWED

Added in API level 33
public static final int ERROR_GATT_WRITE_NOT_ALLOWED

A GATT writeCharacteristic request is not permitted on the remote device.

Constant Value: 200 (0x000000c8)

ERROR_GATT_WRITE_REQUEST_BUSY

Added in API level 33
public static final int ERROR_GATT_WRITE_REQUEST_BUSY

A GATT writeCharacteristic request is issued to a busy remote device.

Constant Value: 201 (0x000000c9)

ERROR_MISSING_BLUETOOTH_CONNECT_PERMISSION

Added in API level 31
public static final int ERROR_MISSING_BLUETOOTH_CONNECT_PERMISSION

Error code indicating that the caller does not have the Manifest.permission.BLUETOOTH_CONNECT permission.

Constant Value: 6 (0x00000006)

ERROR_PROFILE_SERVICE_NOT_BOUND

Added in API level 33
public static final int ERROR_PROFILE_SERVICE_NOT_BOUND

Error code indicating that the profile service is not bound. You can bind a profile service by calling BluetoothAdapter.getProfileProxy.

Constant Value: 9 (0x00000009)

ERROR_UNKNOWN

Added in API level 31
public static final int ERROR_UNKNOWN

Indicates that an unknown error has occurred.

Constant Value: 2147483647 (0x7fffffff)

FEATURE_NOT_CONFIGURED

Added in API level 34
public static final int FEATURE_NOT_CONFIGURED

Indicates that the feature status is not configured yet.

Constant Value: 30 (0x0000001e)

FEATURE_NOT_SUPPORTED

Added in API level 33
public static final int FEATURE_NOT_SUPPORTED

Indicates that the feature is not supported.

Constant Value: 11 (0x0000000b)

FEATURE_SUPPORTED

Added in API level 33
public static final int FEATURE_SUPPORTED

Indicates that the feature is supported.

Constant Value: 10 (0x0000000a)

SUCCESS

Added in API level 31
public static final int SUCCESS

Indicates that the API call was successful.

Constant Value: 0 (0x00000000)