cordova-plugin-background-mode icon indicating copy to clipboard operation
cordova-plugin-background-mode copied to clipboard

Can work with BLE?

Open Absant94 opened this issue 3 years ago • 1 comments

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!

Absant94 avatar Mar 16 '21 22:03 Absant94

I'm having a similar problem. When I try to scan in background mode BLE.startScan is never called

gse-mmobile avatar Feb 14 '22 12:02 gse-mmobile