BluetoothException


public class BluetoothException extends CancellationException


Exception for general Bluetooth operations

Summary

Constants

static final int

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

static final int

Error code indicating that Bluetooth is not enabled.

static final int

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

static final int

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

static final int

Indicates that an unknown error has occurred.

static final int

Indicates that the feature status is not configured yet.

static final int

Indicates that the feature is not supported.

Public constructors

BluetoothException(int errorCode, String message, Throwable cause)

Public methods

int

the error code for indicating the reason why the exception is thrown

Constants

BLUETOOTH_NOT_ALLOWED

public static final int BLUETOOTH_NOT_ALLOWED

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

BLUETOOTH_NOT_ENABLED

public static final int BLUETOOTH_NOT_ENABLED

Error code indicating that Bluetooth is not enabled.

DEVICE_NOT_BONDED

public static final int DEVICE_NOT_BONDED

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

DEVICE_NOT_CONNECTED

public static final int DEVICE_NOT_CONNECTED = 4

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

ERROR_UNKNOWN

public static final int ERROR_UNKNOWN

Indicates that an unknown error has occurred.

FEATURE_NOT_CONFIGURED

public static final int FEATURE_NOT_CONFIGURED

Indicates that the feature status is not configured yet.

FEATURE_NOT_SUPPORTED

public static final int FEATURE_NOT_SUPPORTED

Indicates that the feature is not supported.

Public constructors

BluetoothException

Added in 1.0.0-alpha02
public BluetoothException(int errorCode, String message, Throwable cause)

Public methods

getErrorCode

Added in 1.0.0-alpha02
public int getErrorCode()

the error code for indicating the reason why the exception is thrown