I'm trying to force my application to perform a sync every second, or just every 4 or 5 second. However, the minimum period i can make the syncadapter sync is 30-60 seconds. How can archive such a behavior?
No matter what i set i the second parameter in addPeriodicSync(), it won't be below 30 seconds. ContentResolver.setMasterSyncAutomatically(true); ContentResolver.setIsSyncable(mAccount, AUTHORITY, 1);
ContentResolver.setSyncAutomatically(mAccount, AUTHORITY, true);
ContentResolver.addPeriodicSync(
mAccount,
AUTHORITY,
Bundle.EMPTY,
4);
I am aware that this is a bad behavior for an application as it will drain the battery, and that GCM should have been used to create pushes from the server. The application is for a university project presentation so i need to responsive and presentable.
Edit:
I am aware of the possibility of manual sync :):
Thanks in advance.