You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// // doing it like this for demo / testing purposes.. better usage is demonstrated in 'doStartScanning' below
201
+
// (granted2) => {
202
+
// dialogs.alert({
203
+
// title: 'Granted?',
204
+
// message: granted2 ? 'Yep - now invoke that button again' : 'Nope',
205
+
// okButtonText: 'OK!'
206
+
// });
207
+
// }
208
+
// );
209
+
// } else {
210
+
this.isLoading=true;
211
+
// reset the array
212
+
this.peripherals.length=0;
213
+
awaitthis._bluetooth.startScanning({
197
214
seconds: 50,// passing in seconds makes the plugin stop scanning after <seconds> seconds
198
-
// onDiscovered: peripheral => {
199
-
// console.log("peripheral discovered. Not adding it here because we're using a listener.");
200
-
// // this.peripherals.push(peripheral);
201
-
// },
202
-
skipPermissionCheck: false// we can't skip permissions and we need enabled location as we dont use filters: https://developer.android.com/guide/topics/connectivity/bluetooth-le
203
-
})
204
-
.then(()=>(this.isLoading=false))
205
-
.catch(err=>{
206
-
this.isLoading=false;
207
-
dialogs.alert({
208
-
title: 'Whoops!',
209
-
message: err ? err : 'Unknown error',
210
-
okButtonText: 'OK, got it'
211
-
});
215
+
onDiscovered: peripheral=>{
216
+
console.log("peripheral discovered. Not adding it here because we're using a listener.");
0 commit comments