Airplane mode Idle and 30 minute sync loop

by Matt Stephens

Version 1 (May 31, 2016)

Download (9 downloads)

My mobile network doesn't run anything below 3g, so I can't use 2g networking to save battery. So instead when the device is idle this flow uses airplane mode.

1) Upon screen off, 1h timer counts down (provided no media is playing) then will enable airplane mode.
2) Once airplane mode is enabled, a second timer of 30 minutes counts down, then disables airplane mode, forces sync, enables airplane mode again, and begins the 30 minute timer once more. This portion continues to loop until...
3) Upon screen on, airplane mode is disabled and all other fibers are cancelled until further screen on/off action.