Android how to enable/disable auto sync programmatically
I need to know how to toggle auto sync on and off programmatically. kingston I think you are looking for ContentResolver.setMasterSyncAutomatically(<boolean>); What docs says: Sets the master auto-sync setting that applies to all the providers and accounts. If this is false then the per-provider auto-sync setting is ignored. This method requires the caller to hold the permission WRITE_SYNC_SETTINGS. So don't forget to add permission into manifest.xml: <uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" /> This should disable / enable all the syncs. @Sajmon: I updated this i