[Interest] [Qt Connectivity] Bluetooth state is not a HostPoweredOff on Android when turning it off
Oleg Evseev
ev.mipt at gmail.com
Tue Apr 4 22:21:42 CEST 2017
Hi,
I'm working with bluetooth on android. Handling bluetoothLocalDevice
hostModeStateChanged signal I get HostConnectable on one tablet (Android
5.1) and HostDiscoverable on another phone (Android 4.4.4) when I *turn off*
(!) bluetooth in system.
And no signals when I turn bluetooth on in system (and sometimes for
turning on too).
As I see in qt connectivity source code this status is based on android
scan mode and constants are correct:
switch (scanMode) {
case 20: // BluetoothAdapter.SCAN_MODE_NONE
return HostPoweredOff;
case 21: // BluetoothAdapter.SCAN_MODE_CONNECTABLE
return HostConnectable;
case 23: // BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE
return HostDiscoverable;
So it seems to be an android bug, but I haven't found any relevant problems
with android, so I wonder may this be an qt bug?
Thanks in advance for help.
---
With regards, Oleg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170404/8d298238/attachment.html>
More information about the Interest
mailing list