Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Constants](https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes#constants) \| [Inherited Methods](https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes#inhmethods)

# BluetoothStatusCodes

*** ** * ** ***

` public final class BluetoothStatusCodes `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.bluetooth.BluetoothStatusCodes |

<br />

*** ** * ** ***

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` | `https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes#ERROR_AVDTP_DISCOVERY_FAILED` AVDTP discovery failed to find available SEPs on the peer device. |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes#ERROR_BLUETOOTH_NOT_ALLOWED` Error code indicating that the API call was initiated by neither the system nor the active user. |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes#ERROR_BLUETOOTH_NOT_ENABLED` Error code indicating that Bluetooth is not enabled. |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes#ERROR_DEVICE_NOT_BONDED` Error code indicating that the Bluetooth Device specified is not bonded. |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes#ERROR_GATT_WRITE_NOT_ALLOWED` A GATT writeCharacteristic request is not permitted on the remote device. |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes#ERROR_GATT_WRITE_REQUEST_BUSY` A GATT writeCharacteristic request is issued to a busy remote device. |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes#ERROR_INSUFFICIENT_RESOURCES` Profile connection failed from insufficient resources, local or remote. |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes#ERROR_MISSING_BLUETOOTH_CONNECT_PERMISSION` Error code indicating that the caller does not have the `https://developer.android.com/reference/android/Manifest.permission#BLUETOOTH_CONNECT` permission. |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes#ERROR_PROFILE_SERVICE_NOT_BOUND` Error code indicating that the profile service is not bound. |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes#ERROR_RFCOMM_CONNECTION_FAILED` Rfcomm connection failed. |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes#ERROR_ROLE_SWITCH_FAILED` Profile connection failed due to role management related issues. |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes#ERROR_SDP_DISCOVERY_FAILED` Profile service not found with SDP discovery. |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes#ERROR_STREAM_CONNECTION_FAILED` Profile stream connection failed. |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes#ERROR_UNKNOWN` Indicates that an unknown error has occurred. |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes#FEATURE_NOT_CONFIGURED` Indicates that the feature status is not configured yet. |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes#FEATURE_NOT_SUPPORTED` Indicates that the feature is not supported. |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes#FEATURE_SUPPORTED` Indicates that the feature is supported. |
| `int` | `https://developer.android.com/reference/android/bluetooth/BluetoothStatusCodes#SUCCESS` Indicates that the API call was successful. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(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` ` https://developer.android.com/reference/java/lang/Object#wait(long)(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` ` https://developer.android.com/reference/java/lang/Object#wait()() `

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

## Constants

### ERROR_AVDTP_DISCOVERY_FAILED

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ERROR_AVDTP_DISCOVERY_FAILED
```

AVDTP discovery failed to find available SEPs on the peer device.

<br />

Constant Value: 1403 (0x0000057b)

### ERROR_BLUETOOTH_NOT_ALLOWED

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
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.

<br />

Constant Value: 2 (0x00000002)

### ERROR_BLUETOOTH_NOT_ENABLED

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ERROR_BLUETOOTH_NOT_ENABLED
```

Error code indicating that Bluetooth is not enabled.

<br />

Constant Value: 1 (0x00000001)

### ERROR_DEVICE_NOT_BONDED

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ERROR_DEVICE_NOT_BONDED
```

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

<br />

Constant Value: 3 (0x00000003)

### ERROR_GATT_WRITE_NOT_ALLOWED

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ERROR_GATT_WRITE_NOT_ALLOWED
```

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

<br />

Constant Value: 200 (0x000000c8)

### ERROR_GATT_WRITE_REQUEST_BUSY

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ERROR_GATT_WRITE_REQUEST_BUSY
```

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

<br />

Constant Value: 201 (0x000000c9)

### ERROR_INSUFFICIENT_RESOURCES

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ERROR_INSUFFICIENT_RESOURCES
```

Profile connection failed from insufficient resources, local or remote.

<br />

Constant Value: 1404 (0x0000057c)

### ERROR_MISSING_BLUETOOTH_CONNECT_PERMISSION

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ERROR_MISSING_BLUETOOTH_CONNECT_PERMISSION
```

Error code indicating that the caller does not have the `https://developer.android.com/reference/android/Manifest.permission#BLUETOOTH_CONNECT` permission.

<br />

Constant Value: 6 (0x00000006)

### ERROR_PROFILE_SERVICE_NOT_BOUND

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
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 `https://developer.android.com/reference/android/bluetooth/BluetoothAdapter#getProfileProxy(android.content.Context,%20android.bluetooth.BluetoothProfile.ServiceListener,%20int)`.

<br />

Constant Value: 9 (0x00000009)

### ERROR_RFCOMM_CONNECTION_FAILED

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ERROR_RFCOMM_CONNECTION_FAILED
```

Rfcomm connection failed.

<br />

Constant Value: 1405 (0x0000057d)

### ERROR_ROLE_SWITCH_FAILED

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ERROR_ROLE_SWITCH_FAILED
```

Profile connection failed due to role management related issues.

<br />

Constant Value: 1402 (0x0000057a)

### ERROR_SDP_DISCOVERY_FAILED

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ERROR_SDP_DISCOVERY_FAILED
```

Profile service not found with SDP discovery.

<br />

Constant Value: 1400 (0x00000578)

### ERROR_STREAM_CONNECTION_FAILED

Added in [API level 37](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ERROR_STREAM_CONNECTION_FAILED
```

Profile stream connection failed.

<br />

Constant Value: 1401 (0x00000579)

### ERROR_UNKNOWN

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int ERROR_UNKNOWN
```

Indicates that an unknown error has occurred.

<br />

Constant Value: 2147483647 (0x7fffffff)

### FEATURE_NOT_CONFIGURED

Added in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FEATURE_NOT_CONFIGURED
```

Indicates that the feature status is not configured yet.

<br />

Constant Value: 30 (0x0000001e)

### FEATURE_NOT_SUPPORTED

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FEATURE_NOT_SUPPORTED
```

Indicates that the feature is not supported.

<br />

Constant Value: 11 (0x0000000b)

### FEATURE_SUPPORTED

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int FEATURE_SUPPORTED
```

Indicates that the feature is supported.

<br />

Constant Value: 10 (0x0000000a)

### SUCCESS

Added in [API level 31](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public static final int SUCCESS
```

Indicates that the API call was successful.

<br />

Constant Value: 0 (0x00000000)