diff options
-rw-r--r-- | src/android/bluetooth/src/org/qtproject/qt5/android/bluetooth/QtBluetoothLEServer.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/android/bluetooth/src/org/qtproject/qt5/android/bluetooth/QtBluetoothLEServer.java b/src/android/bluetooth/src/org/qtproject/qt5/android/bluetooth/QtBluetoothLEServer.java index cdd16686..9ef254f5 100644 --- a/src/android/bluetooth/src/org/qtproject/qt5/android/bluetooth/QtBluetoothLEServer.java +++ b/src/android/bluetooth/src/org/qtproject/qt5/android/bluetooth/QtBluetoothLEServer.java @@ -237,6 +237,7 @@ public class QtBluetoothLEServer { qtControllerState = 0; // QLowEnergyController::UnconnectedState clientCharacteristicManager.markDeviceConnectivity(device, false); mGattServer.close(); + mGattServer = null; break; case BluetoothProfile.STATE_CONNECTED: clientCharacteristicManager.markDeviceConnectivity(device, true); @@ -461,7 +462,8 @@ public class QtBluetoothLEServer { return; } - mGattServer.addService(service); + boolean success = mGattServer.addService(service); + Log.w(TAG, "Services successfully added: " + success); } /* |