Writing

Android 16 silences your second notification: notification_autogrouped and how to stop it

By Mohamed Gado · · 4 min read

A user of Rafiq, my prayer times app, reported that the Fajr reminder never made a sound while every daytime prayer did. The code had not changed. The phone had moved to Android 16.

Every alarm was firing on time. Android was posting the notification and muting it.

What happens#

On Android 16, when an app's second ungrouped notification reaches the shade, the system bundles the app's notifications and delivers the new one without sound, vibration or a heads-up banner.

Last night's unread Isha reminder was enough to mute the next morning's Fajr. During the day people clear the shade, so the other prayers alerted normally. That is why it looked like a Fajr bug.

I measured it on one release APK, in the same forced Doze, changing only how many unread notifications the app had:

Unread in the shade Autogrouped Sound and vibration Heads-up
0 no yes yes
1 yes no no
12 yes no no

How to see it#

Read the event log:

adb logcat -b events | grep -E "notification_(enqueue|autogrouped|alert)"

The muted one looked like this:

notification_enqueue: adhan-Fajr-2026-08-10 ... flags=AUTO_CANCEL
notification_autogrouped: adhan-Fajr-2026-08-10
notification_alert: [...,0,0,0,1,2048]

The fields of notification_alert are key, buzz, beep, blink, politeness and mute reason. A notification that really alerts reads 1,1,0,0,0.

Do not rely on flags=SILENT in dumpsys notification. I reported that as the cause twice and was wrong both times. I had been jumping the emulator clock forward, which fired a day of reminders within seconds, and Android's notification cooldown marked them all silent. My test method had created the evidence. Fire one notification at a time.

The fix: put them in your own group#

A notification that already belongs to a group of yours is left alone by the bundler. In Kotlin:

builder.setGroup("reminders")
builder.setGroupAlertBehavior(NotificationCompat.GROUP_ALERT_CHILDREN)

GROUP_ALERT_CHILDREN makes each notification alert in its own right.

I expected this to be ignored and nearly used setTimeoutAfter instead, which would have thrown away reminders people still wanted to read. The group worked. With it, I walked 22 reminders over 24 hours without ever clearing the shade, and each one logged 1,1,0,0,0.

In Expo: check your version first#

expo-notifications 58.1.1 and later added grouping on Android through threadIdentifier:

await Notifications.scheduleNotificationAsync({
  content: {
    title: 'Fajr',
    body: 'Time to pray',
    threadIdentifier: 'reminders',
  },
  trigger,
});

In 58.1.8 I can see in the source that this calls setGroup and also posts a group summary. I have not run the 24-hour test against it. My app still ships the patch below, which is what I measured. Try threadIdentifier first, then confirm with the event log that your notification reads 1,1.

On older versions the JavaScript API could not reach setGroup, so I patched the builder to read a group name from the notification's data:

content.body?.optString("androidGroup")?.takeIf { it.isNotEmpty() }?.let { group ->
  builder.setGroup(group)
  builder.setGroupAlertBehavior(NotificationCompat.GROUP_ALERT_CHILDREN)
}

The patch that was not in the build#

The first time I tested the patch it did nothing, and I almost concluded that groups don't help. The patched Kotlin was never compiled. expo-notifications ships a precompiled AAR, so editing its source changes nothing until you tell Expo to build that package from source in package.json:

{
  "expo": {
    "autolinking": {
      "buildFromSource": ["expo-notifications"]
    }
  }
}

The build was green either way. To know for certain, look for a string from your patch inside the compiled code:

unzip -p app-release.apk 'classes*.dex' | grep -c androidGroup

A zero means you are testing the library as it was published. My release script now refuses to ship if that string is missing.

Why I did not subclass the receiver#

expo lets an app replace its notification receiver, which looks cleaner than a patch. It would have hurt existing users. The pending intent for each alarm is built from the receiver's class name, so after the update the app could no longer cancel alarms set by the old version. They would keep firing, ungrouped and silent, next to the new ones. If you move scheduling to a different receiver, plan for the alarms that are already set.

What this does not cover#

I measured Android 16 (API 36) and read the behaviour from the log, not from a written Android guarantee. Other manufacturers may differ. A battery manager that force-stops your app is a separate problem: the alarm never fires, so there is nothing in the log to mute.

Related: a custom sound that plays the default tone in release builds, and Flutter exact alarms on Android 14.