Do a guaranteed execution of code every 15min even in doze mode

154 views Asked by At

I have an active-monitoring healthcare application that needs to be synced with different BLE devices every 15min in order to collect vitals and essential data. For this, I am using a ForegroundService with a Notification, Additionally, I have taken the wake-locks, and unrestricted power plan for the app as well with 15 min Periodic WorkManager Job as a safety check which basically triggers the same ForegroundService if somehow service is killed while device goes to idle or doze mode.

Problem Most devices seem to be working fine, However, most Samsung, Huawei, and Xiaomi devices fail in doze mode. the sync window is increased by 30-120min.

Requirement I want devices to sync reliably even in doze mode. I want to know possible solutions which may achieve this goal. Since data is important for real-time monitoring and triage a Battery-Tradeoff is acceptable as opposed by DOZE mode. Is there any special permission or mechanism I can use to achieve this?

0

There are 0 answers