Native Implementation Notes
Internals that were trimmed from the web team docs. Each section names the web-team topic it belongs to.
Notifications
Notification key (FCM Notification Configuration)
Platform | How the key is applied | How it is read back |
|---|---|---|
Android | Used as the notification tag; the notification id is derived from the key, so | Notification extra |
iOS | The proxy sets it as the |
|
Rendering (FCM Notification Configuration)
Android: pushes and local notifications share one renderer (
NotificationRenderer). Push images are downloaded on the FCM worker thread before the notification is posted.iOS: the Notification Service Extension maps
action_setto theUNNotificationCategorywith the set's id.
Remote dismiss (FCM Notification Configuration)
Android: data-only FCM message.
onMessageReceivedchecksmobiweb_opbefore rendering, then cancels every active notification that matches (key extra or tag; notification group; orcancelAll()).iOS: silent background push (
content-available: 1,apns-push-type: background, priority 5).didReceiveRemoteNotificationremoves matching delivered and pending notifications (key:userInfo.notification_keyor request identifier / collapse id; group: thread identifier), then calls the completion handler.Dismiss through the Notification Service Extension is not implemented yet, so iOS dismiss stays best-effort.
Custom sounds (FCM Notification Configuration)
Android: the repo-root
sounds/folder (.wav), orandroid/app/src/main/res/raw/.iOS: the same
sounds/folder; the build copies it into the app bundle. Sounds added to the App target directly (.wav,.caf,.aiff) still work.
See Notification Sounds for the full routing and resolution rules.
Channels and action sets (Notification Channel Management, Notifications & FCM Token)
The channel registry is persisted in app storage, restored on launch, and registered as
UNNotificationCategoryvalues on iOS.Action sets are persisted natively and re-registered at every launch. On iOS each set becomes a
UNNotificationCategorywith the set's id, merged with the channel categories. Registering categories replaces the whole set, so both are always registered together.Routing a push to its channel:
Android:
NotificationRendererreadschannel_idfrom the payload and builds the notification withNotificationCompat.Builder(context, channelId), so it inherits the channel's sound, vibration, importance and LED color.iOS: only local notifications map
channel_idto the pre-registeredUNNotificationCategory(AppDelegate, whencategoryis not given). Pushes don't: the Notification Service Extension maps onlycategoryandaction_set, so a push needs one of those to get a category.
The iOS
AppleNotificationshim communicates throughWKScriptMessageHandler.
Sharing (Sharing (Android), Sharing (iOS))
Android writes shared files to the app cache and shares them with
FileProviderURIs.iOS creates temporary files with MIME-type validation and cleans them up after the share completes.
Bluetooth (Bluetooth Direct Printing, Security Notes)
Android uses Bluetooth Classic through
BluetoothSocketand BLE throughBluetoothGatt. Use logcat for detailed print output.iOS needs
NSBluetoothAlwaysUsageDescriptioninInfo.plist.
Bridge security (Security Notes)
Android* bridges are injected into every frame. To origin-scope a bridge, move it to WebViewCompat.addWebMessageListener with an allowed-origin list, which is origin-scoped and frame-aware.
FCM proxy (Request Payload)
Action request URLs must have an origin listed in the project's allowed_action_origins in the fcm-proxy project config (see fcm-proxy/docs/PROJECT_MAPPINGS.md). Web teams ask the proxy operator to add theirs.