Android: mark BLE only paired devices

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2017-06-29 22:53:07 -07:00
parent c145cbd754
commit 61fff71391

View file

@ -217,10 +217,12 @@ void BTDiscovery::getBluetoothDevices()
if (checkException("Iterator<BluetoothDevice>.next()", &dev)) {
continue;
}
jint btType = dev.callMethod<jint>("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);
}
}