The graphical OS menu "Accounts and Sync" has lists of user-configured Google accounts.
Please can someone point me in the right direction to programmatically change the synchronization settings associated with one of these accounts?
thank
These settings use the new APIs AccountManager. Here is an example code example that shows how to add a new account. I would suggest that you want to get the credentials of one of the existing accounts and just change the data.
AccountManager
, API.
, ContentResolver#setIsSyncable() , .
ContentResolver#setIsSyncable()
, android.provider.Settings.ACCOUNT_SYNC_SETTINGS EXTRA_AUTHORITIES ["google.com"] , , "account" Account, AccountManager. .
["google.com"]
"account"
ContentResolver.setSyncAutomatically(account, authority, true/false): , , .
Source: https://habr.com/ru/post/1733420/More articles:MS Outlook plugin development using .NET - asp.netExcel: macro for automatic time formatting (without date) - vbathe process of commenting and improving an already written program? - phpWhile the loop with the catch attempt fails when the login to cin fails - c ++How to get form parameter in servlet? request.getAttribute not working - html-formJQuery, convert header to slug - javascriptHow to convert multidimensional array to PHP - arraysIs Flash programming good for prototyping a GUI? - flashFlash UI blocked during flex rpc.soap.Operation :: send - flexDynamic memory and inherited structures in C ++ - c ++All Articles