Skip to main content

Is it possible to turn on synch in Android Account



I'm working on an application that will allow a user to turn on/off synching for their exchange email account.





I am able to get the exchange account using:







Account[] accs = AccountManager.get(this).getAccountsByType("com.htc.android.mail.eas");







but the Account API doesn't seem to offer what I'm looking for. I have also found ContactsContract.Settings database table which stores synch data, but I'm not that sure where to start with that.





Any ideas?


Comments

  1. The ContentResolver contains the API you are looking for.

    Check out the "setIsSyncable" method.

    ReplyDelete

Post a Comment

Popular posts from this blog

Wildcards in a hosts file

I want to setup my local development machine so that any requests for *.local are redirected to localhost . The idea is that as I develop multiple sites, I can just add vhosts to Apache called site1.local , site2.local etc, and have them all resolve to localhost , while Apache serves a different site accordingly.