From d7b8ad7a443575d10eef0ad49b51313550b77b79 Mon Sep 17 00:00:00 2001 From: Jan Mulder Date: Mon, 3 Jul 2017 11:16:18 +0200 Subject: BT discovery Android: Allow BT/LE devices connect both ways For DCs that support both BT and LE, allow the user to connect to both interface layers. Maybe not usefull in the end (as BT is faster than LE), but as long as BT on Android is WIP is it very useful to be able to connect to the interface layer we like. Just add it to the Paired Devices list twice. The normal way, and the LE: prepend way. Signed-off-by: Jan Mulder --- core/btdiscovery.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/btdiscovery.cpp b/core/btdiscovery.cpp index bfc3dc8d2..a5317e58a 100644 --- a/core/btdiscovery.cpp +++ b/core/btdiscovery.cpp @@ -229,6 +229,11 @@ void BTDiscovery::getBluetoothDevices() result.name = dev.callObjectMethod("getName", "()Ljava/lang/String;").toString(); qDebug() << "paired Device type" << btType << "with address" << result.address; btPairedDevices.append(result); + if (btType == 3) { // DEVICE_TYPE_DUAL + result.address = QString("LE:%1").arg(result.address); + qDebug() << "paired Device type" << btType << "with address" << result.address; + btPairedDevices.append(result); + } } } } -- cgit v1.2.3-70-g09d2