NTF-37Recommended
Match each type to the platform's alert level
Give every push type an interruption level on Apple devices and a notification channel on Android, both read from the catalogue urgency. Only critical types break through Focus.
How to do it
Apple's interruption-level takes passive, active, time-sensitive or critical. Time-sensitive breaks through Focus and the notification summary, and people can turn that off per app. Critical plays a sound through the mute switch and needs an entitlement that Apple must approve. From Android 8, every notification belongs to a channel the app creates, and people mute each channel in settings. Name channels after catalogue groups, such as "Orders" and "Security", and send channel_id with each FCM message. FCM falls back to the manifest's default channel when the ID is missing or not created yet. Read the urgency from Keep every notification type in one catalogue.
Examples
JavaScript example
const APNS_LEVEL = { critical: 'time-sensitive', normal: 'active', low: 'passive' };
export function platformOptions(type) {
return {
apns: { payload: { aps: { 'interruption-level': APNS_LEVEL[type.urgency] } } },
android: { notification: { channel_id: type.group } },
};
}
Python example
APNS_LEVEL = {"critical": "time-sensitive", "normal": "active", "low": "passive"}
def platform_options(kind) -> dict:
return {
"apns": {"payload": {"aps": {"interruption-level": APNS_LEVEL[kind.urgency]}}},
"android": {"notification": {"channel_id": kind.group}},
}
How to check
A unit test maps every catalogue type and finds time-sensitive or critical only on critical types, and passive on every low type. A second test finds each channel_id the server sends in the app's list of created channels.
Sources
- Apple, UNNotificationInterruptionLevel
- Apple, Generating a remote notification
- Firebase, FCM HTTP v1 message reference
Related rules
- Keep every notification type in one catalogue in Notifications
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/notifications/push-notifications/push-interruption-levels">Agent Wranglers notifications playbook</a>. In code you write, add a comment next to it with the same link.