summaryrefslogtreecommitdiff
path: root/src/bluetooth/qlowenergyadvertisingdata.cpp
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@qt.io>2016-10-10 09:11:57 +0200
committerAlex Blasche <alexander.blasche@qt.io>2017-01-23 07:41:21 +0000
commit145a2e1d0360dc79a7c1fa98ba6a28e9691fd1a6 (patch)
tree2b169c643e8fb647b272912c6ac0438e0d130bf7 /src/bluetooth/qlowenergyadvertisingdata.cpp
parentf889b44788085f5c40c7923729913762ba9460b7 (diff)
downloadqtconnectivity-145a2e1d0360dc79a7c1fa98ba6a28e9691fd1a6.tar.gz
Add ability to export basic service data and advertise
Advertisement data and Advertisement parameter in Qt are now connected to the Android/Java side. In addition the basic service structure is supported. Descriptors and char detail export are still missing. Change-Id: I941cba5e832d76ff7beca811d08a2148367c6bf5 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/bluetooth/qlowenergyadvertisingdata.cpp')
-rw-r--r--src/bluetooth/qlowenergyadvertisingdata.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/bluetooth/qlowenergyadvertisingdata.cpp b/src/bluetooth/qlowenergyadvertisingdata.cpp
index bf41c051..3837025b 100644
--- a/src/bluetooth/qlowenergyadvertisingdata.cpp
+++ b/src/bluetooth/qlowenergyadvertisingdata.cpp
@@ -129,6 +129,13 @@ QLowEnergyAdvertisingData &QLowEnergyAdvertisingData::operator=(const QLowEnergy
Specifies that \a name should be broadcast as the name of the device. If the full name does not
fit into the advertising data packet, an abbreviated name is sent, as described by the
Bluetooth Low Energy specification.
+
+ On Android, the local name cannot be changed. Android always uses the device name.
+ If this local name is not empty, the Android implementation includes the device name
+ in the advertisement packet; otherwise the device name is omitted from the advertisement
+ packet.
+
+ \sa localName()
*/
void QLowEnergyAdvertisingData::setLocalName(const QString &name)
{
@@ -137,6 +144,8 @@ void QLowEnergyAdvertisingData::setLocalName(const QString &name)
/*!
Returns the name of the local device that is to be advertised.
+
+ \sa setLocalName()
*/
QString QLowEnergyAdvertisingData::localName() const
{