Is it possible to use multiple concurrent proximity observers on Android? I know it sounds like a weird request, but I’m trying to dynamically switch between low power and low latency scanning, and for a couple of different reasons it just made sense to have one continuous low power proximity observer in a foreground service that is always on, and then turn on a low latency observer whenever i need low latency.
I have tried to use a single observer and switch modes at run time, but then I run into this issue where Android’s bluetooth stack prevents me from starting observers too frequently.
I have also tried to use two separate observers in parallel, but then i get ServiceConnectionLeaked exceptions whenever I try to stop the low latency scanner.
If it is not possible to use two concurrent observers, do you have any thoughts on how to switch power modes? I my goal is a continuous low power observer running in a foreground service when the app is closed, but switch to low latency when the user opens the app.
I wish it was possible to reconfigure the observers on-the-fly, without having to stop, reconfigure, and restart every time.
I have tested with the Android Proximity SDK v1.0.3, with a Samsung A8 phone running Android 8.