In-app messaging implementation #6567
Replies: 1 comment 5 replies
-
Hi there - 1- currently you cannot, the in-app-messaging APIs have greatly expanded after the implementation here was completed long ago, and the new APIs, which allow registration of click listeners, with callbacks including message accessors, have not been implemented If 1 is a need for your project, we could merge a PR if proposed - it would need to have javascript APIs that allow you to add react-native event listeners to our delegate implementation on iOS (https://firebase.google.com/docs/reference/ios/firebaseinappmessaging/api/reference/Protocols/FIRInAppMessagingDisplayDelegate) and register listeners on Android (https://firebase.google.com/docs/reference/android/com/google/firebase/inappmessaging/FirebaseInAppMessaging) - and add code in those native implementations to serve as EventEmitters to call those listeners. When the native code listeners are called they would need to parse out the message type / message contents to populate an object (with related typings in the typescript files) for return to the javascript layer where it would then be available to the app There are several examples in the code of event emitters doing this sort of thing and the core/app package handles a lot of the event source / event listener registration stuff since it's a common pattern across firebase modules. The auth package might be a good one since the auth token changed / user changed pattern is similar - it's a whole app listener registration and the events can be completely native SDK generated |
Beta Was this translation helpful? Give feedback.
-
I started implementation firebase in-app messaging and now have a few questions:
Beta Was this translation helpful? Give feedback.
All reactions