cordova-plugin-background-mode
cordova-plugin-background-mode copied to clipboard
Can work with BLE?
Hello!
I don't know if this is a problem or not.
In my case, when I move my app to the background with the background mode enabled, my BLE connection works. But when I throw a BLE event (push a button). This does nothing:
this.background.on("activate").subscribe(()=>this.ble.startNotification(data.id,this.services[i].service,this.services[i].characteristic).subscribe( ()=>this.pressed(),() =>this.showError("FAIL") ));
This is how I suscribe the ble service. If I did this alone with the screen active:
this.ble.startNotification(data.id,this.services[i].service,this.services[i].characteristic).subscribe( ()=>this.pressed(),() =>this.showError("FAIL") )
It works, but not in background.
¿Is a problem withe the library or am i doint somthing wrong?
Thanks!
I'm having a similar problem. When I try to scan in background mode BLE.startScan is never called