I am new in nativescript in general and I am trying to understand how nativescript-bluetooth LE plugin works.
In particular, I would understand if the function defined on "onDiscovered" will be executed in the main thread or in a separate thread. I read that in general Bluetooth LE it is all executed in a separated thread but I am still much confusion.
bluetooth.startScanning({
serviceUUIDs: [],
seconds: 4,
onDiscovered: function (peripheral) {
console.log("Periperhal found with UUID: " + peripheral.UUID);
}
}).then(function() {
console.log("scanning complete");
}, function (err) {
console.log("error while scanning: " + err);
});
Can somebody help me to clarify this point?