Added in API level 31

BluetoothStatusCodes


class BluetoothStatusCodes
kotlin.Any
   ↳ 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
static Int

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

static Int

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

static Int

Error code indicating that Bluetooth is not enabled.

static Int

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

static Int

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

static Int

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

static Int

Profile connection failed from insufficient resources, local or remote.

static Int

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

static Int

Error code indicating that the profile service is not bound.

static Int

Rfcomm connection failed.

static Int

Profile connection failed due to role management related issues.

static Int

Profile service not found with SDP discovery.

static Int

Profile stream connection failed.

static Int

Indicates that an unknown error has occurred.

static Int

Indicates that the feature status is not configured yet.

static Int

Indicates that the feature is not supported.

static Int

Indicates that the feature is supported.

static Int

Indicates that the API call was successful.

Constants

ERROR_AVDTP_DISCOVERY_FAILED

Added in API level 31
static val ERROR_AVDTP_DISCOVERY_FAILED: Int

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

Value: 1403

ERROR_BLUETOOTH_NOT_ALLOWED

Added in API level 31
static val ERROR_BLUETOOTH_NOT_ALLOWED: Int

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

Value: 2

ERROR_BLUETOOTH_NOT_ENABLED

Added in API level 31
static val ERROR_BLUETOOTH_NOT_ENABLED: Int

Error code indicating that Bluetooth is not enabled.

Value: 1

ERROR_DEVICE_NOT_BONDED

Added in API level 31
static val ERROR_DEVICE_NOT_BONDED: Int

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

Value: 3

ERROR_GATT_WRITE_NOT_ALLOWED

Added in API level 33
static val ERROR_GATT_WRITE_NOT_ALLOWED: Int

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

Value: 200

ERROR_GATT_WRITE_REQUEST_BUSY

Added in API level 33
static val ERROR_GATT_WRITE_REQUEST_BUSY: Int

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

Value: 201

ERROR_INSUFFICIENT_RESOURCES

Added in API level 31
static val ERROR_INSUFFICIENT_RESOURCES: Int

Profile connection failed from insufficient resources, local or remote.

Value: 1404

ERROR_MISSING_BLUETOOTH_CONNECT_PERMISSION

Added in API level 31
static val ERROR_MISSING_BLUETOOTH_CONNECT_PERMISSION: Int

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

Value: 6

ERROR_PROFILE_SERVICE_NOT_BOUND

Added in API level 33
static val ERROR_PROFILE_SERVICE_NOT_BOUND: Int

Error code indicating that the profile service is not bound. You can bind a profile service by calling android.bluetooth.BluetoothAdapter#getProfileProxy(Context,android.bluetooth.BluetoothProfile.ServiceListener,int).

Value: 9

ERROR_RFCOMM_CONNECTION_FAILED

Added in API level 31
static val ERROR_RFCOMM_CONNECTION_FAILED: Int

Rfcomm connection failed.

Value: 1405

ERROR_ROLE_SWITCH_FAILED

Added in API level 31
static val ERROR_ROLE_SWITCH_FAILED: Int

Profile connection failed due to role management related issues.

Value: 1402

ERROR_SDP_DISCOVERY_FAILED

Added in API level 31
static val ERROR_SDP_DISCOVERY_FAILED: Int

Profile service not found with SDP discovery.

Value: 1400

ERROR_STREAM_CONNECTION_FAILED

Added in API level 31
static val ERROR_STREAM_CONNECTION_FAILED: Int

Profile stream connection failed.

Value: 1401

ERROR_UNKNOWN

Added in API level 31
static val ERROR_UNKNOWN: Int

Indicates that an unknown error has occurred.

Value: 2147483647

FEATURE_NOT_CONFIGURED

Added in API level 34
static val FEATURE_NOT_CONFIGURED: Int

Indicates that the feature status is not configured yet.

Value: 30

FEATURE_NOT_SUPPORTED

Added in API level 33
static val FEATURE_NOT_SUPPORTED: Int

Indicates that the feature is not supported.

Value: 11

FEATURE_SUPPORTED

Added in API level 33
static val FEATURE_SUPPORTED: Int

Indicates that the feature is supported.

Value: 10

SUCCESS

Added in API level 31
static val SUCCESS: Int

Indicates that the API call was successful.

Value: 0