react-native-ble-manager 12.1.4 → 12.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -291,15 +291,16 @@ class BleManager extends NativeBleManagerSpec {
|
|
|
291
291
|
return;
|
|
292
292
|
}
|
|
293
293
|
if (!getBluetoothAdapter().isEnabled()) {
|
|
294
|
-
enableBluetoothCallback = callback;
|
|
295
294
|
Intent intentEnable = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
|
|
296
295
|
if (getCurrentActivity() == null)
|
|
297
296
|
callback.invoke("Current activity not available");
|
|
298
297
|
else {
|
|
298
|
+
enableBluetoothCallback = callback;
|
|
299
299
|
try {
|
|
300
300
|
getCurrentActivity().startActivityForResult(intentEnable, ENABLE_REQUEST);
|
|
301
301
|
} catch (Exception e) {
|
|
302
|
-
|
|
302
|
+
enableBluetoothCallback = null;
|
|
303
|
+
callback.invoke("Error starting enable bluetooth activity");
|
|
303
304
|
}
|
|
304
305
|
|
|
305
306
|
}
|