How can I keep my app on Galaxy watch4 alive and the service running during watch idle mode?

799 views Asked by At

I'm an Android developer and working on a wearable app that runs on Galaxy watch 4. In short description, this app use a foreground service that's connected to Mqtt broker and receives real-time alerts and displays them to the user. Up until recent system SW upgrade I used a Wifi Lock to keep the network alive for my app and the foreground service allowed my app to keep running in the back during idle mode. I also used a Wake Lock to wake the watch when an alert was received so it can be displayed to the user.

On 16.02.22 the watches were updated and after that, whenever the watch turns off the screen and goes into idle mode, my application disconnects from all OS resources (network, even CPU). It seems like the process is suspended. When I bring the watch back from idle, my application continues running but its stays in the background and not returned to the fore.

I tried different approaches to solve this, such as Ambient mode and more, all my efforts to come up with a workaround met a brick wall. Am I missing something? I see other apps that use body monitoring via the sensors for example, that keep working and throw notifications even when the watch is idle.

Please help, how can I keep my app alive and the service running (and using the network) during watch idle mode?

0

There are 0 answers