Skip to content

Commit ad432d7

Browse files
committed
Added retrievePeripheralsByAddress for Android
The method will return an "Operation not supported" error on Android
1 parent 515f60d commit ad432d7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/android/BluetoothLePlugin.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ public class BluetoothLePlugin extends CordovaPlugin {
213213
private final String errorDescriptor = "descriptor";
214214
private final String errorRequestConnectionPriority = "requestConnectPriority";
215215
private final String errorMtu = "mtu";
216+
private final String errorRetrievePeripheralsByAddress = "retrievePeripheralsByAddress";
216217

217218
//Error Messages
218219
//Initialization
@@ -424,6 +425,11 @@ public boolean execute(String action, final JSONArray args, final CallbackContex
424425
notifyAction(args, callbackContext);
425426
} else if ("setPin".equals(action)) {
426427
setPinAction(args, callbackContext);
428+
} else if ("retrievePeripheralsByAddress".equals(action)) {
429+
JSONObject returnObj = new JSONObject();
430+
addProperty(returnObj, keyError, errorRetrievePeripheralsByAddress);
431+
addProperty(returnObj, keyMessage, logOperationUnsupported);
432+
callbackContext.error(returnObj);
427433
} else {
428434
return false;
429435
}

0 commit comments

Comments
 (0)