Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 14: fix sync not getting automatically triggered #953

Closed
UweTrottmann opened this issue Nov 3, 2023 · 2 comments
Closed

Android 14: fix sync not getting automatically triggered #953

UweTrottmann opened this issue Nov 3, 2023 · 2 comments
Labels
android-bug Something isn't working because Android

Comments

@UweTrottmann
Copy link
Owner

UweTrottmann commented Nov 3, 2023

Check emails from Stefan with details.

It appears that on Android 14 (API 34) the ContentResolver.isSyncPending(account, authority) API always returns true, regardless if a sync is actually pending.

It appears this happens once ContentResolver.setSyncAutomatically(account, authority, true) is called (even before any ContentResolver.requestSync calls).

The value does not change

  • even after a sync has run (AbstractThreadedSyncAdapter.onPerformSync has completed) or
  • ContentResolver.setSyncAutomatically(account, authority, false) is called.

The account settings UI also always shows the (non-animated) refresh indicator:

Did not find any issues on the Google issue tracker (if that's the right one?) or online, yet. Edit: better link.

User confirmed my observations on the emulator.

Quick fix in #952

Long-term fix is probably switching to WorkManager APIs. Looks like upcoming 2.9 release is a good fit.

@UweTrottmann
Copy link
Owner Author

Try to verify this on my own device now that Android 14 has been available for a while.

@UweTrottmann
Copy link
Owner Author

Yep, also happens on my own Samsung Android 14 device. So leaving the workaround in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
android-bug Something isn't working because Android
Projects
None yet
Development

No branches or pull requests

1 participant