2

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?

  • If it's changed because of a samsung upgrade, then I suspect this is a better question for samsung developer forums directly, they may be protecting battery against a number of apps doing similar to your app. – Yuri Schimke Mar 31 '22 at 07:28
  • i'm having very similar problems. i want to send data every 15 minutes. my current approach is setting an alarm with setExactAndAllowWhileIdle and RTC_WAKEUP which should start my service (at the moment it's a CoroutineWorker which calls setForeground() ). well it doesn't work reliable if the display goes off. maybe we can share a list of things we tried... i'm gonna work the next days on the topic and will keep you updated, maybe you can do the same. – Veit Apr 02 '22 at 07:32
  • @YuriSchimke I asked in Samsung dev forum.. they say its not the right place: https://forum.developer.samsung.com/t/galaxy-watch-4-idle-mode-issue/19590 – Kirill Rogachevsky Apr 03 '22 at 07:09
  • Yep - but I don't think you can get an answer in stack overflow for the specifics of how and why Samsung software updates broke your software. I've asked on that forum for where they take bug reports. Otherwise they've just decided not to answer. – Yuri Schimke Apr 03 '22 at 07:30

0 Answers0