# Bluetooth device management

## Pair a Bluetooth device to a vehicle

The following method allows you to create a logical pairing between a Bluetooth device and a vehicle. The results of data analysis containing a Bluetooth device will be assigned to the vehicle to which the peripheral has been paired with.

{% tabs %}
{% tab title="DriveKitVehicle" %}

<pre class="language-kotlin"><code class="lang-kotlin">fun addBluetoothToVehicle(
<strong>    bluetooth: Bluetooth,
</strong>    vehicle: Vehicle,
    listener: VehicleAddBluetoothQueryListener
)
</code></pre>

{% endtab %}
{% endtabs %}

This method have the following parameters:

| Name      | Type                                                          | Description                                             |
| --------- | ------------------------------------------------------------- | ------------------------------------------------------- |
| bluetooth | [Bluetooth](/vehicle/android/references-android.md#bluetooth) | Bluetooth device information.                           |
| vehicle   | [Vehicle](/vehicle/android/references-android.md#vehicle)     | The vehicle you wish to pair with the Bluetooth device. |

[VehicleBluetoothStatus](/vehicle/android/references-android.md#vehiclebluetoothstatus) model is described in the References part.

## **Remove the Bluetooth device from a vehicle**

The following function can be used to delete the pairing between a Bluetooth device and a vehicle:

{% tabs %}
{% tab title="First Tab" %}

```kotlin
fun removeBluetoothToVehicle(
    vehicle: Vehicle,
    listener: VehicleRemoveBluetoothQueryListener
)
```

{% endtab %}
{% endtabs %}

This method have the following parameter:

| Name    | Type                                                      | Description                                               |
| ------- | --------------------------------------------------------- | --------------------------------------------------------- |
| vehicle | [Vehicle](/vehicle/android/references-android.md#vehicle) | The vehicle you wish to unpair with the Bluetooth device. |

[VehicleRemoveBluetoothStatus](/vehicle/android/references-android.md#vehicleremovebluetoothstatus) model is described in the References part.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.drivequant.com/vehicle/android/bluetooth-device-management.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
