Android 14: Changes to how users experience non-dismissible notifications

Issue

So I have the following information about non-dismissible notifications on Android 14:

####################################################

Changes to how users experience non-dismissible notifications

If your app shows non-dismissable foreground notifications to users, Android 14 has changed the behavior to allow users to dismiss such notifications.

This change applies to apps that prevent users from dismissing foreground notifications by setting Notification.FLAG_ONGOING_EVENT through Notification.Builder#setOngoing(true) or NotificationCompat.Builder#setOngoing(true). The behavior of FLAG_ONGOING_EVENT has changed to make such notifications actually dismissable by the user.

These kinds of notifications are still non-dismissable in the following conditions:

  • When the phone is locked
  • If the user selects a Clear all notification action (which helps with accidental dismissals)

Also, this new behavior doesn’t apply to notifications in the following use cases:

  • CallStyle notifications
  • Device policy controller (DPC) and supporting packages for enterprise

####################################################

It’s not really good for apps which do media playback, recording or streaming audio/video. It means users can hide it and apps will continue to play media, recording or streaming audio/video without displaying any notification about it.

Or does Google except us to stop a foreground service (and all tasks) on notification dismiss while media playback or any other task is still active? Or can we continue our task active in foreground just without displaying any state/status to users (no notification)?

How should we interpret this new change in Android 14?

Then I decided to check Google’s YouTube music app on Android 14 and found out that the notification can NOT be dismissed for some reason (or it looks like it’s being dismissed but their foreground service recreates a new one right away):

enter image description here

What does it mean? I checked all other apps and notifications can be dismissed, but not for this Google’s app.

Solution

So yeah it seems Google allows users to dismiss notifications but apps can still continue to do ongoing tasks.

From here they say that users can check ongoing foreground services in new Task Manager (Android 13+):

On Android 13 (API level 33) or higher, if the user denies the
notification permission, they still see notices related to foreground
services in the Task Manager but don’t see them in the notification
drawer.

I didn’t notice any Task Manager in Samsung S22 (running Android 14) yet when I was hiding ongoing notifications.
Also I didn’t notice it in Pixel emulator running Android 13 and 14.

The mystery of YouTube music app is still there 🙂

Answered By – user924

Answer Checked By – Timothy Miller (FlutterFixes Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *