Notification Channel Management
Manage notification channels from website code through native bridges on Android and iOS.
This page documents the new v1 operations:
Create channel
List channels
Delete channel
Platform Model
Android maps directly to
NotificationChannel.iOS maps channel IDs to
UNNotificationCategory(best-effort parity).
Because iOS does not support Android-style channel importance/sound behavior at the same level, treat iOS channel support as category registration for routing and compatibility.
Android
Bridge object: AndroidNotification
Methods
Method | Return | Description |
|---|---|---|
|
| Creates or updates a channel on Android 8+ |
|
| Lists all app channels |
|
| Deletes a channel by ID (except protected default channel) |
createNotificationChannel payload
payloadJson is a JSON string with:
Accepted importance values:
String:
none,min,low,default,high,maxNumber: Android
NotificationManagerimportance int
Android response shapes
Create success:
List success:
Delete success:
Common error values:
bridge_unavailableunsupported_android_versionchannel_id_requirednotification_manager_unavailabledefault_channel_protectedcreate_failedlist_faileddelete_failed
iOS
Bridge object: AppleNotification
Methods
Method | Return | Description |
|---|---|---|
|
| Creates or updates an iOS channel mapping |
|
| Requests channel list |
|
| Deletes channel mapping |
iOS methods are asynchronous. Results are emitted as browser events.
iOS payload for createChannel
Stored fields:
idnamedescriptionimportance
importance is currently stored for parity/documentation and future use, but iOS delivery behavior remains category-based.
iOS events
Event name |
| Description |
|---|---|---|
|
| Create/update result |
|
| List result |
|
| Delete result |
The channel registry is persisted in app storage and restored on app launch, then registered as UNNotificationCategory values.
Compatibility Notes
Android
channel_idis the native routing key.iOS local notifications now map
channel_idtocategoryIdentifierwhencategoryis not supplied.Deleting a non-existent channel is treated as a successful no-op on both platforms.
Deleting Android
default_channelis blocked.
Website Usage Examples
Android helper
iOS helper
Recommended Migration
Create channels during app startup or user/session initialization.
Keep channel IDs stable and lowercase.
Use
channel_idconsistently in push/local payloads.Keep an application-level fallback to
default_channelon Android.
Publishing Notifications via FCM Proxy
To send a push notification to a specific channel created by the website:
Step 1: Create Channel (Website)
Call the bridge to create a channel with a stable ID:
Step 2: Send FCM Notification (Backend)
Include the channel_id in the FCM proxy payload's data object:
Critical: The channel_id in your FCM payload must match the channelId you created via the bridge.
Step 3: Device Routes Notification Automatically
Android:
NotificationRendererreads thechannel_idfrom FCM payloadCreates notification using
NotificationCompat.Builder(context, "order_updates")Notification inherits all channel settings: sound, vibration, importance, LED color, etc.
iOS:
AppDelegatereceives the notification withchannel_idMaps
channel_id→UNNotificationCategoryidentifierUses the pre-registered category (from app startup UserDefaults)
Notification displays with category-configured behavior
Channel Settings Inherited by Notification
Android Channel Property | iOS Equivalent | Inherited by Notification |
|---|---|---|
| Category behavior | Display priority, sound, interruption level |
Sound | Notification sound | ✓ Plays on device |
Vibration | Haptic pattern | ✓ Haptic feedback if enabled |
Light color | LED indicator | ✓ LED flash (Android only) |
Allow bypass DND | Category | ✓ Breaks through Do Not Disturb |
Complete Example: Order Notifications
Website initialization (app startup):
Backend sends notification:
Result: Notification appears with high-importance treatment, sound, vibration, and user can tap to view order details.
No FCM Proxy Changes Required
The FCM proxy already supports channel_id in data payloads. Both platforms automatically:
Read
channel_idfrom the notification dataMap it to the locally-created channel/category
Inherit all configured channel behavior
The bridge is purely for creating channels with their settings; FCM proxy just targets them via channel_id.