Open n1705771 opened 4 years ago
Please describe BLE scanning options.
Problem may relate to android-10 issues.
For background scanning you should always define at least one ServiceUUID
of target peripherals.
For bg.scanning on iOS
you also need to define some code in config.xml
to allow it.
@helllamer Thanks. I use ionic native ble, I am not sure how to set BLE scanning options. I just called scan method as below code:
import { BLE } from '@ionic-native/ble';
...
public ble: BLE,
...
this.ble.scan([], 5).subscribe(
...
Try something like this:
this.ble.scan(['faa1'], 5)...
'faa1'
- string, not number - an example ServiceUUID 0xFAA1.
Hi Sir,
I apply background plugin and bluetooth low energy plugin in my ionic 3 application. I enable the application working in background mode. The bluetooth plugin works well when application is in both foreground and background. But when phone's screen turns off, it will stop scanning peripheral devices. I have tried wakeUp() and unlock() methods, but doesn't help. I am not sure this is a issue of bakcground plugin or bluetooth low energy plugin. Could you please give some advice for this?
Many thanks