cordova-plugin-bluetoothle
cordova-plugin-bluetoothle copied to clipboard
method getAdapterInfo didn't work
ionic code:
this.bluetoothle.getAdapterInfo().then((r) => {
console.log('getAdapterInfo success:' + JSON.stringify(r));
}).catch((reason) => {
console.log('getAdapterInfo error:' + reason);
});
and neither log.
I found it didn't executed when I set breakpoint on android project. but other method worked, such 'initialize', 'isEnabled' android plugin code:
public boolean execute(String action, final JSONArray args, final CallbackContext callbackContext) throws JSONException {
//Execute the specified action
if ("initialize".equals(action)) {
initializeAction(args, callbackContext);
} else if ("enable".equals(action)) {
enableAction(callbackContext);
} else if ("getAdapterInfo".equals(action)) {
getAdapterInfoAction(callbackContext);
}
...
Are any errors being thrown on the Java side? There's not much there that could go wrong.