Skip to content

Commit

Permalink
Set ongoing flag for foreground notification to prevent swiping away …
Browse files Browse the repository at this point in the history
…on Android 13
  • Loading branch information
Philipp Heckel committed Nov 28, 2022
1 parent 3d1d062 commit 1b587ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ class SubscriberService : Service() {
.setContentIntent(pendingIntent)
.setSound(null)
.setShowWhen(false) // Don't show date/time
.setOngoing(true) // Starting SDK 33 / Android 13, foreground notifications can be swiped away
.setGroup(NOTIFICATION_GROUP_ID) // Do not group with other notifications
.build()
}
Expand Down
1 change: 1 addition & 0 deletions fastlane/metadata/android/en-US/changelog/29.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Bug fixes + maintenance:
* Upgrade Android dependencies and build toolchain to SDK 33 (no ticket)
* Simplify F-Droid build: Disable tasks for Google Services (#516, thanks to @markosopcic)
* Android 13: Ask for permission to post notifications (#508)
* Android 13: Do not allow swiping away the foreground notification (#521, thanks to @alexhorner for reporting)
* Remove timestamp when copying message text (#471, thanks to @wunter8)
* Fix auto-delete if some icons do not exist anymore (#506)
* Fix notification icon color (#480, thanks to @s-h-a-r-d for reporting)
Expand Down

0 comments on commit 1b587ab

Please sign in to comment.