I'm developing native BLE
android app where I need to constantly remain connected with BLE device. Along with BLE, I also need to track GPS all the time until user doesn't logout. Here are my concerns
-
Can we keep multiple service in foreground? In my case it has to be BLE and Location Tracking.
-
I have seen that service getting killed though it is started using
StartForeground
in serviceonCreate
. Is there any solution that can help me to keep my service alive all the time? -
I'm using
START_STICKY
inonStartCommand
, though it gets killed in the background after long time. -
I'm writing
characterstic
usingBluetoothGatt
to send command to BLE device, I have multiple command to execute, is there any way I can know which command was executed from the response or I need to use flag variable to track the command request?
Please provide suggestions as I'm new to BLE feature.
from BLE Connection getting lost after app is closed
No comments:
Post a Comment