I want to run my SyncAdapter
only on Wifi. In the beginning of onPerformSync
, I can check if wifi is present. If it's not, I want to postpone it until there is WIFI available.
I know of syncresult.delayUntil
but that means that the sync adapter is uselessly called every x minutes although the wifi could be disabled for example for the entire day. Also, from what I've read delayUntil
does not apply if you use triggerSync
directly.
What is the best approach here? Apps like Evernote seem to have this option of syncing only on WIFI.