2

I'm looking for Android specific implementation detail of ScheduledExecutorService.schedule when device is in deep sleep. I understand that schedule will not guarantee exact timing but simply execute "after" the delay. What I am not clear on is how sleep (and deep sleep?) is accounted in the timing. To be specific scenario:

Schedule a task an hour later 5mins in, the phone goes to sleep for 30mins When do I expect the task to get scheduled?

Also if the phone wake up long after the scheduled time, is the task then scheduled for execution immediately?

Phuong Nguyen
  • 909
  • 7
  • 20

1 Answers1

-1

As far as this post says Difference between AlarmManager and ScheduledExecutorService, it won't work in deep sleep mode. And I think it should be pretty simple to test it on an android device if you try to run a task after some arbitrary time and just wait for device to go in deep sleep mode.

Community
  • 1
  • 1
kaps
  • 190
  • 3
  • 9
  • You can find this post useful too: https://github.com/couchbase/couchbase-lite-android/issues/346 – kaps Mar 25 '15 at 20:30