summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/android/androidbroadcastreceiver_p.h
Commit message (Collapse)AuthorAgeFilesLines
* LE/Android: Pass list of advertised services found in scan recordAlex Blasche2016-11-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the advertising packet (scan record) received from BLE devices during scanning on Android devices is ignored. Consequently, the serviceUuids() method of the QBluetoothDeviceInfo class returns an empty list for BLE devices. However, this list provides important information needed by clients to identify whether a given device is of interest. This changeset implements parsing of the scan record received from the Android Bluetooth layer. The Java byte array is passed over JNI to the C++ adapter classes, where it's parsed to find any service UUIDs being advertised by the device. Parsing the scan record ourselves is required for compatibility (Qt uses "old-style" LE scan API from Android api level 18.) All found UUIDs are added to a list which is subsequently passed to the user of the QBluetoothDeviceDiscoveryAgent class via the deviceDiscovered(QBluetoothDeviceInfo&) signal. Note: not all Android devices pass the full advertisement data. The service UUID list may be empty in those cases. [ChangeLog][QtBluetooth][Android] Parse list of advertised services found in LE scan record and pass them to API client via QBluetoothDeviceInfo::serviceUuids() Task-number: QTBUG-56625 Change-Id: I253f1b841c7b15b3bbabc9e478de87c81979815e Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Make Classic QtBluetooth work as an Android serviceAlex Blasche2016-08-031-1/+1
| | | | | Change-Id: Ibde0242b058f728fd7e060b37f427c208325db13 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Updated license headersAntti Kokko2016-01-201-15/+21
| | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I856c13e2a6d4d12c46e1286b0ca1c092ee4608f8 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-161-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I3822a6484e8f7a420330de1cb1aeb0c3d1cf41b7 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* Android: Add BluetoothLE device scanAlex Blasche2014-10-281-0/+2
| | | | | | Change-Id: Ibbb1e9f141d494327082aebaf9e34ffe44039115 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-08-281-0/+12
|\ | | | | | | | | | | | | Conflicts: src/bluetooth/qbluetoothdevicediscoveryagent_p.cpp Change-Id: Ie8bf1903f9c7c1ccd5b05a3f97049ae0882b88b8
| * Add missing private headers warningSamuel Gaist2014-08-181-0/+12
| | | | | | | | | | Change-Id: I0f079a9b1b45bd2d2e946e06d7688f299a9c3fc3 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | Update license headers and add new licensesJani Heikkinen2014-08-241-18/+10
|/ | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I7a8b8b787fcae9a178794364efdefe1021d10b1b Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Android: Fix crashes due to concurrency issuesAlex Blasche2014-03-111-1/+1
| | | | | | | | | | | | | | | BroadcastReceiver.onReceive() is executed in the main thread whereas the Qt classes are in a different thread. This created issues whereby Java's qtObject pointer was reset by the Qt classes/thread but onReceive still trying to access the same object later on. In most cases the Qt classes using BroadcastReceiver were half way through their object tear down. This patch fixes the problem by guarding qtObject against concurrent thread access and ensures that the qtObject pointer is reset before the object tear down starts. Change-Id: Iab97b0af8e10686d97419ac8504f2fe69e9536f3 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Android: Don't directly use the action string values but refer to the fields.Alex Blasche2014-03-111-1/+1
| | | | | | | | | | | | | This increases the robustness of the code since the field value is not an implementation detail. In addition we guard the action field lookup against fields which have been introduced later than the standard SDK version 10 supported by Qt. Task-number: QTBUG-36810 Change-Id: Ib6582e77202d40aaf116fe8dfa81562d89367ea2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Port QtBluetooth to AndroidAlex Blasche2014-02-131-0/+77
This is a feature merge to dev targeting Qt 5.3. Known issues: -QTBUG-36754: QBluetoothServer::close() crashes -QTBUG-36763: QBluetothTransferManager port to Android not possible -QTBUG-36764: Improve QBluetoothLocalDevice::connectedDevices() -QTBUG-36810: Remove direct use of Android action strings The above issues and some other minor TODO's will be addressed until final release time. Task-number: QTBUG-33792 [ChangeLog][QtBluetooth][Android] QtBluetooth has been ported to Android. Change-Id: I31ba83e3b7d6aa68e7258b7e43235de7d1a6e68a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>