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.
package/android/build.gradle
CHANGED
|
@@ -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
|
-
|
|
200
|
+
enableBluetoothCallback = null;
|
|
201
|
+
callback.invoke("Error starting enable bluetooth activity");
|
|
201
202
|
}
|
|
202
203
|
|
|
203
204
|
}
|