Skip to content

Commit b020949

Browse files
author
Silviu Capota-Mera
authored
fix isScanning
use the correct callback context nullabe check to determine if scanning is on or off
1 parent 057c197 commit b020949

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/android/BluetoothLePlugin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1042,7 +1042,7 @@ private void getAdapterInfoAction(CallbackContext callbackContext) {
10421042
addProperty(returnObj, keyName, bluetoothAdapter.getName());
10431043
addProperty(returnObj, keyIsInitialized, true);
10441044
addProperty(returnObj, keyIsEnabled, bluetoothAdapter.isEnabled());
1045-
addProperty(returnObj, keyIsScanning, bluetoothAdapter.isDiscovering());
1045+
addProperty(returnObj, keyIsScanning, (scanCallbackContext != null));
10461046
addProperty(returnObj, keyIsDiscoverable, bluetoothAdapter.getScanMode() == BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE);
10471047
PluginResult pluginResult = new PluginResult(PluginResult.Status.OK, returnObj);
10481048
pluginResult.setKeepCallback(true);

0 commit comments

Comments
 (0)