3

I am working on an app that periodically polls server for new data (I know I should use GCM, but its not an option here). I am using AlarmManager.setInexactRepeating() to atleast allow system to batch networking request to save some battery.

However now I am working on a update and I do not want to poll at night. How would I do this? The usual approach would be have one-time alarms that each would schedule the next one appropriately to avoid that night-time interval.

But this approach, as far as I see, doesnt allow that batching that inexactRepeating does ..

Is there a way to set one-time inexact alarm?

Thanks

4

0 に答える 0