In my AccountAuthenticatorActivity
I try setup sync-options for an Account after addAccountExplicitly
with following lines:
ContentResolver.setIsSyncable(account, authority, 1);
ContentResolver.setSyncAutomatically(account, authority, true);
int seconds = getResources().getInteger(R.integer.syncFrequencySeconds);
ContentResolver.addPeriodicSync(account, authority, new Bundle(), seconds);
syncFrequencySeconds
is set to 86400 (every 24 hours). But my sync-adapter is still triggered every minute. What am I doing wrong? (sync itselfs works without any problems)
Solved it myself: the sync-adapter repeats when the SyncResult.stats
do not match with the ContentResolver-Operations. As they matched, sync is triggered as expected.
Update: another issue was, that I called ContentResolver.notifyUpdate during sync-operation. removed that, and it was fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With