I've implemented SyncAdapter
, with sync frequency as 10 seconds. But while running the application, this sync frequency is automatically updated to 900 seconds.
Account Creation code:
public static void createSyncAccount(Context c) {
boolean created = false;
Account account = getAccount();
AccountManager manager = (AccountManager)c.getSystemService(Context.ACCOUNT_SERVICE);
if (manager != null && manager.addAccountExplicitly(account, null, null)) {
final String AUTHORITY = UserIntakeContract.CONTENT_AUTHORITY;
final long SYNC_FREQUENCY = 10; // (seconds)
ContentResolver.setIsSyncable(account, AUTHORITY, 1);
ContentResolver.setSyncAutomatically(account, AUTHORITY, true);
ContentResolver.addPeriodicSync(account, AUTHORITY, new Bundle(), SYNC_FREQUENCY);
created = true;
}
if (created) {
SyncAdapter.performSync();
}
}
Log Trace:
03-13 10:00:16.902 18073-18094/system_process W/ContentService:
Requested poll frequency of 10 seconds being rounded up to 900s.
But I'm not able to find any resource or documentation stating minimum poll frequency as 15 minutes (900 seconds).
Can anyone provide some authentic resource or documentation or explanation?