whisperr_firebase_messaging 0.1.0
whisperr_firebase_messaging: ^0.1.0 copied to clipboard
Firebase Cloud Messaging for the Whisperr Flutter SDK — push token, permission state and notification-open tracking with deep links in a few calls.
Changelog #
0.1.0 #
First release. Needs whisperr 0.6.0.
registerFirebaseMessaging(FirebaseMessaging): asks for permission, reports it (setPushPermission), registers the FCM token withkind: fcm, forwards token refreshes, and checks the permission again on each resume. On iOS,useApnsToken: trueregisters the raw APNs token (kind: apns) with theapnsEnvironmentyou pass.handleRemoteMessage(RemoteMessage): sendspush_openedand returns the message id and deep link.handleNotificationOpens(FirebaseMessaging, onOpen:): handlesgetInitialMessage()(cold start) andonMessageOpenedApp, once per message.whisperrPermissionFrom(AuthorizationStatus).- Contract v2 (with
whisperr0.6.0):- The FCM token goes with the Firebase project id as
provider_project(frommessaging.app.options.projectId), on registration and on each refresh. Not in APNs mode. registerFirebaseMessagingreports Whisperr pushes that arrive in the foreground (FirebaseMessaging.onMessage) aspush_received, once per message. OptionstrackForegroundReceipts(default true) andonMessage.registration.cancel()stops it. NewhandleForegroundMessage(RemoteMessage). No background receipts.handleNotificationOpenssendscold_start: truefor the launch message andfalsefor later taps.handleRemoteMessagetakescoldStart. Opens go withaction_id: default.useApnsTokenwithoutapnsEnvironmentlogs a debug warning. The package has no native code, so the app passes the environment.- The permission report reaches Whisperr as the event
push_permission_changed(from thewhisperrcore).
- The FCM token goes with the Firebase project id as