# BluetoothPairingCallback.PairingError

Summary:[Constants](https://developer.android.com/reference/com/google/android/things/bluetooth/BluetoothPairingCallback.PairingError#constants)\|[Methods](https://developer.android.com/reference/com/google/android/things/bluetooth/BluetoothPairingCallback.PairingError#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/com/google/android/things/bluetooth/BluetoothPairingCallback.PairingError#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/com/google/android/things/bluetooth/BluetoothPairingCallback.PairingError#)  

# BluetoothPairingCallback.PairingError

`
public
static


class
BluetoothPairingCallback.PairingError
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

|---|---------------------------------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | com.google.android.things.bluetooth.BluetoothPairingCallback.PairingError |

<br />

*** ** * ** ***

## Summary

|                                                                                                                                       ### Constants                                                                                                                                       ||
|-------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `int` | [UNBOND_REASON_AUTH_CANCELED](https://developer.android.com/reference/com/google/android/things/bluetooth/BluetoothPairingCallback.PairingError#UNBOND_REASON_AUTH_CANCELED) A bond attempt failed because we canceled the bonding process                                         |
| `int` | [UNBOND_REASON_AUTH_FAILED](https://developer.android.com/reference/com/google/android/things/bluetooth/BluetoothPairingCallback.PairingError#UNBOND_REASON_AUTH_FAILED) A bond attempt failed because pins did not match, or remote device did not respond to pin request in time |
| `int` | [UNBOND_REASON_AUTH_REJECTED](https://developer.android.com/reference/com/google/android/things/bluetooth/BluetoothPairingCallback.PairingError#UNBOND_REASON_AUTH_REJECTED) A bond attempt failed because the other side explicitly rejected bonding                              |
| `int` | [UNBOND_REASON_AUTH_TIMEOUT](https://developer.android.com/reference/com/google/android/things/bluetooth/BluetoothPairingCallback.PairingError#UNBOND_REASON_AUTH_TIMEOUT) A bond attempt failed because of authentication timeout                                                 |
| `int` | [UNBOND_REASON_DISCOVERY_IN_PROGRESS](https://developer.android.com/reference/com/google/android/things/bluetooth/BluetoothPairingCallback.PairingError#UNBOND_REASON_DISCOVERY_IN_PROGRESS) A bond attempt failed because a discovery is in progress                              |
| `int` | [UNBOND_REASON_REMOTE_AUTH_CANCELED](https://developer.android.com/reference/com/google/android/things/bluetooth/BluetoothPairingCallback.PairingError#UNBOND_REASON_REMOTE_AUTH_CANCELED) A bond attempt failed because we received an Authentication Cancel by remote end        |
| `int` | [UNBOND_REASON_REMOTE_DEVICE_DOWN](https://developer.android.com/reference/com/google/android/things/bluetooth/BluetoothPairingCallback.PairingError#UNBOND_REASON_REMOTE_DEVICE_DOWN) A bond attempt failed because we could not contact the remote device                        |
| `int` | [UNBOND_REASON_REMOVED](https://developer.android.com/reference/com/google/android/things/bluetooth/BluetoothPairingCallback.PairingError#UNBOND_REASON_REMOVED) An existing bond was explicitly revoked                                                                           |
| `int` | [UNBOND_REASON_REPEATED_ATTEMPTS](https://developer.android.com/reference/com/google/android/things/bluetooth/BluetoothPairingCallback.PairingError#UNBOND_REASON_REPEATED_ATTEMPTS) A bond attempt failed because of repeated attempts                                            |

|                                                                        ### Public methods                                                                        ||
|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` int` | ` `[getErrorCode](https://developer.android.com/reference/com/google/android/things/bluetooth/BluetoothPairingCallback.PairingError#getErrorCode())`() ` |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/com/google/android/things/bluetooth/BluetoothPairingCallback.PairingError#)From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                                                                                                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                                                                                                                                                                                                                                           | | ` void`                                                                        | ` `[finalize](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 `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                                                                                                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                                                                                                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                                                                                                                                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                                                                                                                                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                                                                                                                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long, int))`(long millis, int nanos) ` Causes the current thread to wait until another thread invokes the[notify()](https://developer.android.com/reference/java/lang/Object.html#notify())method or the[notifyAll()](https://developer.android.com/reference/java/lang/Object.html#notifyAll())method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long millis) ` Causes the current thread to wait until either another thread invokes the[notify()](https://developer.android.com/reference/java/lang/Object.html#notify())method or the[notifyAll()](https://developer.android.com/reference/java/lang/Object.html#notifyAll())method for this object, or a specified amount of time has elapsed.                                                                 | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until another thread invokes the[notify()](https://developer.android.com/reference/java/lang/Object.html#notify())method or the[notifyAll()](https://developer.android.com/reference/java/lang/Object.html#notifyAll())method for this object.                                                                                                                                  | ||

## Constants

### UNBOND_REASON_AUTH_CANCELED

```
int UNBOND_REASON_AUTH_CANCELED
```

A bond attempt failed because we canceled the bonding process

<br />

Constant Value: 3 (0x00000003)  

### UNBOND_REASON_AUTH_FAILED

```
int UNBOND_REASON_AUTH_FAILED
```

A bond attempt failed because pins did not match, or remote device did not respond to pin request in time

<br />

Constant Value: 1 (0x00000001)  

### UNBOND_REASON_AUTH_REJECTED

```
int UNBOND_REASON_AUTH_REJECTED
```

A bond attempt failed because the other side explicitly rejected bonding

<br />

Constant Value: 2 (0x00000002)  

### UNBOND_REASON_AUTH_TIMEOUT

```
int UNBOND_REASON_AUTH_TIMEOUT
```

A bond attempt failed because of authentication timeout

<br />

Constant Value: 6 (0x00000006)  

### UNBOND_REASON_DISCOVERY_IN_PROGRESS

```
int UNBOND_REASON_DISCOVERY_IN_PROGRESS
```

A bond attempt failed because a discovery is in progress

<br />

Constant Value: 5 (0x00000005)  

### UNBOND_REASON_REMOTE_AUTH_CANCELED

```
int UNBOND_REASON_REMOTE_AUTH_CANCELED
```

A bond attempt failed because we received an Authentication Cancel by remote end

<br />

Constant Value: 8 (0x00000008)  

### UNBOND_REASON_REMOTE_DEVICE_DOWN

```
int UNBOND_REASON_REMOTE_DEVICE_DOWN
```

A bond attempt failed because we could not contact the remote device

<br />

Constant Value: 4 (0x00000004)  

### UNBOND_REASON_REMOVED

```
int UNBOND_REASON_REMOVED
```

An existing bond was explicitly revoked

<br />

Constant Value: 9 (0x00000009)  

### UNBOND_REASON_REPEATED_ATTEMPTS

```
int UNBOND_REASON_REPEATED_ATTEMPTS
```

A bond attempt failed because of repeated attempts

<br />

Constant Value: 7 (0x00000007)

## Public methods

### getErrorCode

```
int getErrorCode ()
```

<br />

<br />

|    Returns    ||
|-------|--------|
| `int` | <br /> |

-

  ## Interfaces

  - [BluetoothConnectionCallback](https://developer.android.com/reference/com/google/android/things/bluetooth/BluetoothConnectionCallback)
  - [BluetoothPairingCallback](https://developer.android.com/reference/com/google/android/things/bluetooth/BluetoothPairingCallback)
-

  ## Classes

  - [BluetoothClassFactory](https://developer.android.com/reference/com/google/android/things/bluetooth/BluetoothClassFactory)
  - [BluetoothConfigManager](https://developer.android.com/reference/com/google/android/things/bluetooth/BluetoothConfigManager)
  - [BluetoothConnectionManager](https://developer.android.com/reference/com/google/android/things/bluetooth/BluetoothConnectionManager)
  - [BluetoothPairingCallback.PairingError](https://developer.android.com/reference/com/google/android/things/bluetooth/BluetoothPairingCallback.PairingError)
  - [BluetoothProfile](https://developer.android.com/reference/com/google/android/things/bluetooth/BluetoothProfile)
  - [BluetoothProfileManager](https://developer.android.com/reference/com/google/android/things/bluetooth/BluetoothProfileManager)
  - [ConnectionParams](https://developer.android.com/reference/com/google/android/things/bluetooth/ConnectionParams)
  - [PairingParams](https://developer.android.com/reference/com/google/android/things/bluetooth/PairingParams)