diff options
author | Alex Blasche <alexander.blasche@theqtcompany.com> | 2016-08-03 11:08:44 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@qt.io> | 2016-08-03 11:38:12 +0000 |
commit | dc1e5850237660df4c64c5ed29e5f7824be6ce81 (patch) | |
tree | 6ae16aa637ecf31955722c7769d89c1809875a92 /src/bluetooth/android | |
parent | af14b0d0e3b374f130e580c03dee6af1250cd6e1 (diff) |
Make QtBluetooth Low Energy work when Qt runs as Android service
Change-Id: Ic0814c3f5a65ce9ac9236c41397400fc42abb572
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Diffstat (limited to 'src/bluetooth/android')
-rw-r--r-- | src/bluetooth/android/lowenergynotificationhub.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bluetooth/android/lowenergynotificationhub.cpp b/src/bluetooth/android/lowenergynotificationhub.cpp index 9ece5bf0..2a6cdce3 100644 --- a/src/bluetooth/android/lowenergynotificationhub.cpp +++ b/src/bluetooth/android/lowenergynotificationhub.cpp @@ -61,9 +61,9 @@ LowEnergyNotificationHub::LowEnergyNotificationHub( const QAndroidJniObject address = QAndroidJniObject::fromString(remote.toString()); jBluetoothLe = QAndroidJniObject("org/qtproject/qt5/android/bluetooth/QtBluetoothLE", - "(Ljava/lang/String;Landroid/app/Activity;)V", + "(Ljava/lang/String;Landroid/content/Context;)V", address.object<jstring>(), - QtAndroidPrivate::activity()); + QtAndroidPrivate::activity() ? QtAndroidPrivate::activity() : QtAndroidPrivate::service()); if (env->ExceptionCheck() || !jBluetoothLe.isValid()) { |