Only allow background services notifications to alert once #281
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.
This fixes the device playing the notification source or vibrating every time the notification is updated (for progress bar changes). I didn't catch this when implementing #268 because I had a Pixel Watch connected, which always forces the
setOnlyAlertOnce(true)
behavior.Additionally, this changes the default importance of the background services notifications to low (referred to as "Silent" in Android's UI). Even with the original bug fixed, it doesn't make much sense to play a sound or vibrate one time when an operation starts. This change in defaults only takes effect for new installs. It is not possible to change existing notification channel settings.
Fixes: #276