Repository navigation
Ask for the notification permission on first launch - #32
Merged
Merged
Conversation
The permission dialog appeared only after a sync error had been recorded, so with working sync it never showed up. It also could not cover the first error: links usually arrive through Share, the error happens in the background, and the dialog waits until the main screen is opened again. The main screen now asks the first time it opens. The request is still made once; after that Settings repeats it or opens the system notification settings. Closes #31
Merged
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.
Closes #31
What changes
On Android 13 and newer the main screen asks for the notification permission the first time it opens. Before, the dialog appeared only after a sync error had been recorded, so with working sync it never showed up, and the first background error went without a notification.
The request is still made once. After a denial the app does not ask again on launch; Settings → Sync problem alerts → Turn on repeats the request while Android allows it and otherwise opens the system notification settings. Users who have already seen the dialog are not asked again.
R28 in the spec and the notifications paragraph in the README describe the new moment of the request.
Verification
assembleDebug lintDebug testDebugUnitTest connectedDebugAndroidTestpass; 61 instrumented tests on an API 36 emulator.NotificationAccessTest.asksOnLaunchOnlyOncecovers the launch decision.pm clear:Known limitation, not changed here
Closing the first dialog with Back is not a denial for Android, yet the app has already recorded the request. Turn on in Settings then opens the system notification settings instead of the dialog. The same happened before this change.