BluetoothSocketException
open class BluetoothSocketException : IOException
kotlin.Any | ||||
↳ | kotlin.Throwable | |||
↳ | java.lang.Exception | |||
↳ | java.io.IOException | |||
↳ | android.bluetooth.BluetoothSocketException |
Thrown when an error occurs during a Bluetooth Socket related exception.
This is currently only intended to be thrown for a failure during android.bluetooth.BluetoothSocket#connect()
operation.
Summary
Constants | |
---|---|
static Int |
Error code during connect when Bluetooth is off and socket connection is triggered. |
static Int |
Error code during connect when there is an ACL connection failure. |
static Int |
Error code during connect when security clearance fails on the client during L2CAP connection. |
static Int |
Error code during connect when authentication fails on the peer device during L2CAP connection. |
static Int |
Error code during connect when authorization fails on the peer device during L2CAP connection. |
static Int |
Error code during connect for insufficient encryption from the peer device during L2CAP connection. |
static Int |
Error code during connect indicating insufficient encryption key size on the peer device during L2CAP connection. |
static Int |
Error code during connect for invalid parameters from the peer device during L2CAP connection. |
static Int |
Error code during connect for invalid Channel ID from the peer device during L2CAP connection. |
static Int |
Error code during connect when no PSM is available for L2CAP connection. |
static Int |
Error code during connect when no resources are available for L2CAP connection. |
static Int |
Error code during connect for already allocated Channel ID from the peer device during L2CAP connection. |
static Int |
Error code during connect when L2CAP connection timeout. |
static Int |
Error code during connect for unacceptable Parameters from the peer device during L2CAP connection. |
static Int |
Error code during connect when socket connection fails for unknown reason during L2CAP connection. |
static Int |
Error code during connect when null device attempts to do socket connection. |
static Int |
Error code during connect when a Runtime RPC exception occurs. |
static Int |
Error code during connect when socket is closed. |
static Int |
Error code during connect for generic socket connection failures. |
static Int |
Error code during connect when socket manager is not available. |
static Int |
Error code during connect when the UNIX socket connection creation fails. |
static Int |
Error code representing a failure during |
Public constructors | |
---|---|
BluetoothSocketException(code: Int) Create a |
|
BluetoothSocketException(code: Int, msg: String) Create a |
Public methods | |
---|---|
open Int |
Returns the error code associated to this failure. |
Constants
BLUETOOTH_OFF_FAILURE
static val BLUETOOTH_OFF_FAILURE: Int
Error code during connect when Bluetooth is off and socket connection is triggered.
Value: 15
L2CAP_ACL_FAILURE
static val L2CAP_ACL_FAILURE: Int
Error code during connect when there is an ACL connection failure.
Value: 2
L2CAP_CLIENT_SECURITY_FAILURE
static val L2CAP_CLIENT_SECURITY_FAILURE: Int
Error code during connect when security clearance fails on the client during L2CAP connection.
Value: 3
L2CAP_INSUFFICIENT_AUTHENTICATION
static val L2CAP_INSUFFICIENT_AUTHENTICATION: Int
Error code during connect when authentication fails on the peer device during L2CAP connection.
Value: 4
L2CAP_INSUFFICIENT_AUTHORIZATION
static val L2CAP_INSUFFICIENT_AUTHORIZATION: Int
Error code during connect when authorization fails on the peer device during L2CAP connection.
Value: 5
L2CAP_INSUFFICIENT_ENCRYPTION
static val L2CAP_INSUFFICIENT_ENCRYPTION: Int
Error code during connect for insufficient encryption from the peer device during L2CAP connection.
Value: 7
L2CAP_INSUFFICIENT_ENCRYPT_KEY_SIZE
static val L2CAP_INSUFFICIENT_ENCRYPT_KEY_SIZE: Int
Error code during connect indicating insufficient encryption key size on the peer device during L2CAP connection.
Value: 6
L2CAP_INVALID_PARAMETERS
static val L2CAP_INVALID_PARAMETERS: Int
Error code during connect for invalid parameters from the peer device during L2CAP connection.
Value: 11
L2CAP_INVALID_SOURCE_CID
static val L2CAP_INVALID_SOURCE_CID: Int
Error code during connect for invalid Channel ID from the peer device during L2CAP connection.
Value: 8
L2CAP_NO_PSM_AVAILABLE
static val L2CAP_NO_PSM_AVAILABLE: Int
Error code during connect when no PSM is available for L2CAP connection.
Value: 13
L2CAP_NO_RESOURCES
static val L2CAP_NO_RESOURCES: Int
Error code during connect when no resources are available for L2CAP connection.
Value: 12
L2CAP_SOURCE_CID_ALREADY_ALLOCATED
static val L2CAP_SOURCE_CID_ALREADY_ALLOCATED: Int
Error code during connect for already allocated Channel ID from the peer device during L2CAP connection.
Value: 9
L2CAP_TIMEOUT
static val L2CAP_TIMEOUT: Int
Error code during connect when L2CAP connection timeout.
Value: 14
L2CAP_UNACCEPTABLE_PARAMETERS
static val L2CAP_UNACCEPTABLE_PARAMETERS: Int
Error code during connect for unacceptable Parameters from the peer device during L2CAP connection.
Value: 10
L2CAP_UNKNOWN
static val L2CAP_UNKNOWN: Int
Error code during connect when socket connection fails for unknown reason during L2CAP connection.
Value: 1
NULL_DEVICE
static val NULL_DEVICE: Int
Error code during connect when null device attempts to do socket connection.
Value: 19
RPC_FAILURE
static val RPC_FAILURE: Int
Error code during connect when a Runtime RPC exception occurs.
Value: 20
SOCKET_CLOSED
static val SOCKET_CLOSED: Int
Error code during connect when socket is closed.
Value: 17
SOCKET_CONNECTION_FAILURE
static val SOCKET_CONNECTION_FAILURE: Int
Error code during connect for generic socket connection failures.
Value: 18
SOCKET_MANAGER_FAILURE
static val SOCKET_MANAGER_FAILURE: Int
Error code during connect when socket manager is not available.
Value: 16
UNIX_FILE_SOCKET_CREATION_FAILURE
static val UNIX_FILE_SOCKET_CREATION_FAILURE: Int
Error code during connect when the UNIX socket connection creation fails.
Value: 21
UNSPECIFIED
static val UNSPECIFIED: Int
Error code representing a failure during BluetoothSocket
. The reason for failure isn't specified.
Value: 0
Public constructors
BluetoothSocketException
BluetoothSocketException(code: Int)
Create a BluetoothSocketException
with an error code. A generic error message is generated based on the code
provided.
BluetoothSocketException
BluetoothSocketException(
code: Int,
msg: String)
Create a BluetoothSocketException
with an error code and custom error message.
Public methods
getErrorCode
open fun getErrorCode(): Int
Returns the error code associated to this failure.