Make ReactNativeFirebaseMessagingSerializer public? #4577
Replies: 1 comment 2 replies
-
| Hi there! We actually have a history of doing similar, I had a brownfield use case and we made the firestore serializer public, so in general yes. But before I go and do that (or more specifically: if you make a PR - before I merge it ;-) ) - is there some way to get the delay correct? The emitter and JS actually do a little dance where native bottles up events until JS calls a specific event (post initialization) then JS is supposed to uncork them. See the detailed discussion here: #4528 (comment) It is all supposed to work, and it is likely very very close to working but we have a similar problem on ios and android, fixing the underlying problem would be a huge help to everyone vs going brownfield on this one | 
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Could we make
ReactNativeFirebaseMessagingSerializerpublic? (in android native package)I'm migrating from v5 and I have a use case where I need to subclass
ReactNativeFirebaseMessagingServiceto hook intoonMessageReceivedto then use the data of theRemoteMessageto show a notification.Tapping this notification sould open the app on the right screen (this is done on the js side) but I run into a race condition when the js is not completely loaded and therefore not ready to listen to events.
I had a workaround for this using in v5 the
LocalBroadcastManagerto re-send the event to the js side when I'm sure to be ready to catch the event but I see rn-firebase now uses aReactNativeFirebaseEventEmitter. But this emitter sends events that are built using theReactNativeFirebaseMessagingSerializerand it is package-private.Basically I'd like to be able to do this:
Beta Was this translation helpful? Give feedback.
All reactions