feat(in_app_messaging): expose the message lifecycle events - #18584
feat(in_app_messaging): expose the message lifecycle events#18584Lyokone wants to merge 1 commit into
Conversation
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 馃憤 and 馃憥 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. |
b6b18e7 to
5d73bd8
Compare
Adds `onMessageClicked`, `onMessageImpression`, `onMessageDismissed` and `onMessageDisplayError` to `FirebaseInAppMessaging`, so apps can react to what happens to a campaign message - most importantly read the action URL of the button a user tapped, together with the campaign metadata. The native listeners are attached the first time one of the streams is read, so apps that never listen keep the current behavior and, on iOS, keep ownership of the `InAppMessaging` display delegate. Android reports no dismiss type, so `InAppMessagingDismissType.unknown` is always used there. Closes #12984
5d73bd8 to
3487ae3
Compare
Description
FirebaseInAppMessagingasonMessageClicked,onMessageImpression,onMessageDismissedandonMessageDisplayError, carrying the campaign metadata and, for clicks, the action URL and button text. A new PigeonFlutterApiforwards the events, Android registers its four listeners on a main thread executor, and iOS conforms toInAppMessagingDisplayDelegate. Two platform differences are documented rather than emulated: Android reports no dismiss type, soInAppMessagingDismissType.unknownis used there, andonMessageDisplayErrorreports the AndroidInAppMessagingErrorReasonname on Android and the localized error description on iOS.InAppMessaging.delegateis a single slot, so attaching eagerly would take it from apps that set it in native code; apps that never use these streams keep the current behavior.Related Issues
Checklist
///).melos run analyze) does not report any problems on my PR.Breaking Change