weliem / blessed-android-coroutines

BLESSED Coroutines, a Bluetooth Low Energy (BLE) library for Android using Kotlin Coroutines

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to auto connect BLE device when in range in background?

mmswide opened this issue · comments

Is there a way to auto connect BLE device in background when the app is in the background?

The method autoConnectPeripheral() will work as long as the app is running. If your app gets killed often you need to use a ForegroundService....

Thank you. I will try.

I created foreground service and startScan in background task.
But I could get any response from BluetoothCentralManagerCallback.
Would you please help me how I can get this callback from startScan in background?

I think your question is going beyond the scope of this library, so I am closing the issue