react-native-ble-manager 11.6.0 → 11.6.1

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.
@@ -33,7 +33,7 @@ android {
33
33
  }
34
34
 
35
35
  defaultConfig {
36
- minSdkVersion safeExtGet("minSdkVersion", 21)
36
+ minSdkVersion safeExtGet("minSdkVersion", 24)
37
37
  targetSdk safeExtGet("targetSdk", 34)
38
38
  }
39
39
  lintOptions {
@@ -188,16 +188,17 @@ class BleManager extends ReactContextBaseJavaModule {
188
188
  return;
189
189
  }
190
190
  if (!getBluetoothAdapter().isEnabled()) {
191
- enableBluetoothCallback = callback;
192
191
  Intent intentEnable = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
193
192
  if (getCurrentActivity() == null)
194
193
  callback.invoke("Current activity not available");
195
194
  else
196
195
  {
196
+ enableBluetoothCallback = callback;
197
197
  try{
198
198
  getCurrentActivity().startActivityForResult(intentEnable, ENABLE_REQUEST);
199
199
  }catch(Exception e){
200
- callback.invoke("Current activity not available");
200
+ enableBluetoothCallback = null;
201
+ callback.invoke("Error starting enable bluetooth activity");
201
202
  }
202
203
 
203
204
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-ble-manager",
3
- "version": "11.6.0",
3
+ "version": "11.6.1",
4
4
  "description": "A BLE module for react native.",
5
5
  "repository": {
6
6
  "type": "git",