Repository navigation
Say when the system keeps background refresh from running - #1804
Merged
Merged
Conversation
Settings › Notifications now says when the system doesn't let the background sync run, so new content can't be notified about while learnX is closed, and opens the system settings to turn it back on: - iOS: Background App Refresh turned off for learnX or for every app. When Screen Time or device management doesn't allow it, it says so without a button. Low Power Mode, which pauses it for every app until it ends, isn't reported. - Android: background battery use restricted for learnX, which keeps its WorkManager job from running until the app is opened. The default battery optimization still runs it, so it isn't reported. - The Mac has no such setting. It shows only while a notification that the sync finds is on (reminders are scheduled ahead and still come), and after the notification permission, which comes first. A new local module, modules/background, reads the state, since expo-background-task's getStatusAsync reports only whether the API exists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Rui · project thread
What
Settings › Notifications now says when the system doesn't let the background sync run, so new content can't be found or notified about while learnX is closed, and offers a button to the system settings that turn it back on.
UIApplication.backgroundRefreshStatus == .denied).restricted)ActivityManager.isBackgroundRestricted), which keeps the WorkManager job from running until the app is openedNot reported:
The section appears only while a notification that the sync finds is on (new notices, assignments and files, grades, deadline changes, group submissions, and New Versions where it applies). Class and deadline reminders are scheduled ahead and still come. When the notification permission itself is off, that section shows first and this one waits.
How
modules/background: a new local Expo module,getState()→on | off | lowPower | managed, with Swift Testing and Robolectric tests.expo-background-task'sgetStatusAsynccan't be used: on iOS it reports only whether the API exists (always unavailable on the simulator, available on a device), and on Android it always reports available.services/notifications.getBackgroundRefreshState()reads it (onwhere the module is missing or fails), anduseNotificationPermissionchecks it with the permissions, again each time the app comes back from the system settings.backgroundRefreshOfficon (exclamationmark.arrow.triangle.2.circlepath/sync_disabled/ArrowSyncOffRegular).ota-fingerprint.json: records the new module's native code; 19.1.0 hasn't shipped, so the runtime version stays.Generated by Claude Code