Enable Auto-sync Only When WiFi is Enabled

Auto-sync is a great feature in Android, but it's either on all the time or it's off. Unfortunately, for people like me who are on a limited data plan, having Auto-sync enabled when the only available data connection is 2G/3G/HSPA/LTE (i.e. over the cell network) is not desirable, since Auto-sync can silently eat into my data allowance. I do want my calendar and contacts (and other data) to sync with Google and my other accounts, but only if I'm on a WiFi network at home or at work. Tasker to the rescue!

Create a new profile:

  • Name: WiFi Autosync
  • State -> Net -> WiFi Connected (if you want Auto-sync only when connected to a specific WiFi access point, you can specify that here, otherwise, leave everything blank)

Add a new task to this profile:

  • Name: I leave this blank
  • Add an action: Net -> Auto-Sync -> Set = On

Also add an exit task:

  • Name: I leave this blank
  • Add an action: Net -> Auto-Sync -> Set = Off

Now whenever you're connected to a WiFi network, AutoSync will be automatically enabled, and as soon as you leave it, AutoSync will get disabled.

If you're like me and you have location-based profiles for "Home" and "Work" to connect to those respective WiFi networks automatically, you don't even have to enable/disable WiFi manually - AutoSync will enable/disable as soon as you enter/leave those locations.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License