tags:

views:

62

answers:

1

Is there a way to change the sync settings of a Gmail account programmatically with an Android app? For instance, I'd like to enable/disable syncing of a Gmail account from my app, without the user having to do anything.

I took a look at AccountManager, but that doesn't seem to be the right place to look.

A: 

I can tell you:

  • Generally, sync is controlled via the BACKGROUND_DATA setting in Settings.Secure, which cannot be modified by applications
  • The Gmail application is not part of the SDK and so exposes no APIs
CommonsWare
Hm, so the only way to turn syncing on/off is by having the user manually do it?
Kyle Slattery