Proximity observation in foreground service

Hello,

as a company, we are developing an application that needs continuous proximity monitoring in a long-running task.
The application launches a foreground service, in order to perform some tasks, which holds a reference to the observer handler (the reference is stored in a list which is a member of the foreground service class) and starts / stops observation. So far so good, observation works for approximately one hour and then hangs, zones are not triggered and errors are not displayed. The other long-running tasks launched by the service keep running. Does someone has an idea about this behaviour? If the app restarts the proximity observation or, sometimes, when the user awakes the watch by turning on the screen then proximity start working again.

The application runs on wear OS 2.6 on a Huawei watch

Thanks for your help!

EDIT:
I experience a similar behavior with the foreground estimote service provided by the APIs

If I were to guess, your Huawei watch has some kind of timeout for Bluetooth scanning. You could try to confirm that by restarting the observer every hour or so.

1 Like

Thanks for the response, I have implemented a background job that stops and restarts the observer handler every 40 minutes but we have to test it. As soon as we get a result I will post here.

1 Like