Буду благодарен за помощь.
Я попробовал этот код здесь
Код: Выделить всё
public void disConnectDevice(String address) {
BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
BluetoothDevice device = bluetoothAdapter.getRemoteDevice(address);
BluetoothGatt mBluetoothGatt = device.connectGatt(this, false, gattCallback);
mBluetoothGatt.disconnect();
}
private BluetoothGattCallback gattCallback = new BluetoothGattCallback() {
@Override
public void onConnectionStateChange(BluetoothGatt gatt, int status, int newState) {
super.onConnectionStateChange(gatt, status, newState);
gatt.close();
}
};
Подробнее здесь: https://stackoverflow.com/questions/781 ... o-my-phone