Reputation: 1060
I recently wrote a new AccountProvider which has three SyncProviders attached for Android.
Account creation and everything else is working fine but whenever a user creates a new Account in Android the 3 SyncProviders are disabled. I think that changed but I don't know where I messed up the configuration.
I read the docs but found no option to give a SyncProvider an initial state. Can you give me a hint?
Any Code you need will gladly be postet as soon as I can.
Upvotes: 2
Views: 183
Reputation: 2020
I use the code below and it worked for me.
ContentResolver.setIsSyncable(account, "com.your.package", 1);
ContentResolver.setSyncAutomatically(account, "com.your.package", true);
Upvotes: 2