From 61fff71391ceef0840dadc95f78b586e6f2be6a3 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 29 Jun 2017 22:53:07 -0700 Subject: Android: mark BLE only paired devices Signed-off-by: Dirk Hohndel --- core/btdiscovery.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'core/btdiscovery.cpp') diff --git a/core/btdiscovery.cpp b/core/btdiscovery.cpp index 1326b175b..e99fff6ee 100644 --- a/core/btdiscovery.cpp +++ b/core/btdiscovery.cpp @@ -217,10 +217,12 @@ void BTDiscovery::getBluetoothDevices() if (checkException("Iterator.next()", &dev)) { continue; } - + jint btType = dev.callMethod("getType", "()I"); result.address = dev.callObjectMethod("getAddress","()Ljava/lang/String;").toString(); + if (btType == 2) // DEVICE_TYPE_LE + result.address = QString("LE:%1").arg(result.address); result.name = dev.callObjectMethod("getName", "()Ljava/lang/String;").toString(); - + qDebug() << "paired Device type" << btType << "with address" << result.address; btPairedDevices.append(result); } } -- cgit v1.2.3-70-g09d2