Split out from #1. Aggressive battery-optimization / background-app-killing on several major Android OEMs is a well-known way for exactly this kind of app (foreground service + accessibility service that need to keep running indefinitely) to silently stop working, hours or days after it looked fine in testing. No device-optimization-specific testing has been done at all yet.
What to check, per manufacturer (at minimum Samsung and Xiaomi, ideally also OnePlus/Oppo/Huawei if available)
This is inherently a "needs real hardware from that manufacturer, over a real multi-hour/day period" task - not something a quick emulator check can substitute for.
Split out from #1. Aggressive battery-optimization / background-app-killing on several major Android OEMs is a well-known way for exactly this kind of app (foreground service + accessibility service that need to keep running indefinitely) to silently stop working, hours or days after it looked fine in testing. No device-optimization-specific testing has been done at all yet.
What to check, per manufacturer (at minimum Samsung and Xiaomi, ideally also OnePlus/Oppo/Huawei if available)
ScreenMonitorService(the foreground service) survive being backgrounded for several hours without the OS killing it?AppLimitAccessibilityServicestay enabled, or does the OEM's battery manager silently revoke/disable it?BootReceivercorrectly restart tracking after a device reboot on these OEMs specifically (some restrictRECEIVE_BOOT_COMPLETEDmore aggressively)?docs/oem-notes.mdso future contributors don't have to rediscover the same quirks.This is inherently a "needs real hardware from that manufacturer, over a real multi-hour/day period" task - not something a quick emulator check can substitute for.