I am using AccountManager addAccountExplicitly () to add an account to AccountManager. Then i call
ContentResolver.setSyncAutomatically(account, ContactsContract.AUTHORITY, true);
After that, looking at the “Accounts and sync” screen, I see my account, but when I click, I see that the “Sync contacts” checkbox is not displayed. It may take several minutes for it to appear ...
I found out that if I listen to the added account and after a delay (2 seconds) it rings:
ContentResolver.requestSync(account, ContactsContract.AUTHORITY, new Bundle());
It is synchronized.
1. What does synchronization take time to synchronize? 2. Is this the right way to sync your account immediately? (will it always work?)
source share