I think (not tested) the best solution is already defined in ContentResolver.
ContentResolver.requestSync(account, authority, extras);
so that you can do the following:
AccountManager am = AccountManager.get(context); Account account = null; am.getAccountsByType(mytype); for(Account a : accounts) { if (am.getUserData(account, key)) { account = a; break; } } Bundle extras = new Bundle(); extras.putString(EXTRA_mystuff, myvalue); ContentResolver.requestSync(account, authority, extras)
mobibob Mar 20 2018-11-11T00: 00Z
source share