Question

does anyone know what exactly ContentResolver.SYNC_EXTRAS_EXPEDITED does? the api documentation for that constant is essentially blank.

it sounds like what i want (sync the supplied account first, before the others), but it's always good to know for sure...

Was it helpful?

Solution

You can find a definition in Google's guide to Running a Sync Adapter. It's as follows:

SYNC_EXTRAS_EXPEDITED

Forces the sync to start immediately. If you don't set this, the system may wait several seconds before running the sync request, because it tries to optimize battery use by scheduling many requests in a short period of time.

OTHER TIPS

Google same word sends me here. See this answer Starting just my sync immediately.

Yes, if you want to sync your app immediately(refresh your list):

Bundle extras = new Bundle();
extras.putBoolean(ContentResolver.SYNC_EXTRAS_EXPEDITED, true);
extras.putBoolean(ContentResolver.SYNC_EXTRAS_MANUAL, true);
ContentResolver.requestSync(mAccount,ExampleContract.CONTENT_AUTHORITY,extras);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top