summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/android/devicediscoverybroadcastreceiver.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix Qt6 buildAlexandru Croitor2019-08-011-4/+4
| | | | | | | | | Prepend namespace to text stream operands and fix deprecated function and enum usage. Change-Id: Ib9c74f940173f678d7c5af143cd2fd4e8da982e7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Remove usage of deprecated QBluetoothServiceInfo::DataCompleteAlex Blasche2019-05-071-2/+2
| | | | | | | The related functions were deprecated by fac56a229b45395488f3e41bf178361c72b3ee1e. Change-Id: Ia94b1824bb6ea7d1a8e3bb8eb5e82074e9facb7a Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Add manufacturer data to QBluetoothDeviceInfoAlex Blasche2018-08-171-0/+7
| | | | | | | The initial patch was contributed by Thiemo van Engelen. Change-Id: I45fad793ba092ab2820e606d8bf8807afa3e911e Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Replace Q_NULLPTR with nullptrKevin Funk2017-09-291-14/+14
| | | | | Change-Id: Ica194c2568465a94d851ddeaf62ca71b33fe4464 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove last qdoc warning from qtconnectivityAlex Blasche2017-06-141-1/+1
| | | | | | | | | | | src/bluetooth/android/devicediscoverybroadcastreceiver.cpp:240: warning: Cannot tie this documentation to anything [I found a /*! ... */ comment, but there was no topic command (e.g., '\fn', '\page') in the comment and no function definition following the comment.] The file referenced in the warning does not contribute to the QtBluetooth documentation. The patch removes qdoc annotation from the file. Change-Id: Ie5699d79a12e5fc1851a924adbf50ebcb5059454 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* LE/Android: Fix crash due to references leakKonstantin Ritt2016-12-301-1/+4
| | | | | | | | | | in f945ffc90f8f11d73dc87f2d82bb2d246d446e71, a very basic scanRecord parser has been added, which calls GetByteArrayElements without releasing the elemnts, causing JNI core exception > E/dalvikvm: Failed adding to JNI pinned array ref table (1023 entries) Change-Id: I272593c232f0c87c1983f1f568aa6c3599d44253 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* LE/Android: Pass list of advertised services found in scan recordAlex Blasche2016-11-111-3/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Remove not needed Log output from Android Device DiscoveryAlex Blasche2016-11-071-1/+0
| | | | | Change-Id: Ibe1871578394fa1e0f039425036ab0dd5223be49 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-161-11/+298
|\ | | | | | | Change-Id: I3eec9a22565585d4fc40831d609a3083ce99a52c
| * Android: Device discovery doesn't provide major & minor device class infoAlex Blasche2016-08-011-11/+298
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QBluetoothDeviceDiscoveryAgent did not extract the QBluetoothDeviceInfo::majorDeviceClass() and QBluetoothDeviceInfo::minorDeviceClass() information. The Android API provides info for all major device classes. However not each major device class has its set of API for the minor device class information. Caching is applied to match Android major device class values against their matching Qt enum. When a matching entry is found, the value is added to the cache. In principle, the mechanism is applied for minor device class values. However since there are many many more minor device class fields, the caching is a bit more proactive. The patch will proactively read and cache all minor device class values for a given major device class. This avoids a large overhead of very long if..else if...else if..else statements. Change-Id: I26a6c29c6f5dca6d4f3b4b25902cda03a10ae5de Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | 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-44/+67
| | | | | | Change-Id: Ibbb1e9f141d494327082aebaf9e34ffe44039115 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Android: Determine the Bluetooth type of the remote deviceAlex Blasche2014-10-281-0/+58
| | | | | | | | This requires Android version 18 or higher. Change-Id: I62495721ab888e48a7fdecb7d95c35d461904046 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> 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: Don't directly use the action string values but refer to the fields.Alex Blasche2014-03-111-12/+17
| | | | | | | | | | | | | 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/+132
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>