I created a small wear os App based on API 28 that running on my galaxy watch 4.
Last week I got the new Galaxy Watch 4 update and it seems that google changed the foreground service conditions again -.-*
I created a foreground service that triggers a scheduled task each 30 seconds to send a request with okhttp2 to my server (heartbeat) and it works pretty fine with API level 28. After checking the heartbeat from server log it shows me the following :
20-02-2022 07:11:54 Heartbeat :fa9f65b0a96250bd (virtual device android stuido)
20-02-2022 07:12:19 Heartbeat :My real watch id
20-02-2022 07:12:24 Heartbeat :fa9f65b0a96250bd
20-02-2022 07:12:54 Heartbeat :fa9f65b0a96250bd
20-02-2022 07:13:24 Heartbeat :fa9f65b0a96250bd
20-02-2022 07:13:54 Heartbeat :fa9f65b0a96250bd
20-02-2022 07:14:24 Heartbeat :fa9f65b0a96250bd
i would guess if the real watch switch to "standby" mode, it sets my foreground service to sleep until "wakeup". Does anybody got the same problem and got a solution to re-enable scheduled tasks in "standby" ? Are there any documentation for the new changes on the foregroundservice ?
Kind regards :)