React-native-firebase: Found Notifications module on the docs for Firebase V6

Created on 28 Mar 2020  ·  6Comments  ·  Source: invertase/react-native-firebase

Hi,

I was reading your new awesome docs and I found pages about Notifications : https://rnfb-docs.netlify.com/messaging/notifications#handling-interaction

It explains well that Notifications module can displays and handles notifications.

Here is that it confused me...

I found issue about telling that notifications is not available in react-native-firebase v6, and will not be. https://github.com/invertase/react-native-firebase/issues/2566#issuecomment-541109278

But it is finally available? Or we are not talking about same Notifications? 🤔

Then it’s suggesting some combination to replace the v5 Firebase Notifications :

  • react-native-firebase v5
  • react-native-firebase v6 + react-native-push-notifications (or other 3rd party) for free
  • react-native-firebase v6 + Notifee

But it seems that ‘The Cloud Messaging module provides basic support for displaying & handling notifications’.

My question is, is Firebase Cloud Messaging can « displays » notifications without 3rd party?

Thanks 🙏

All 6 comments

Yeah it's pretty confusing 😁

The messaging module wraps around the underlying fcm SDKs for android and ios.

By default, when an incoming message comes in from fcm, if it contains a notification object and the device is in the background, a notification will be automatically created for you. The new 6.4.0 update allows you to hook into the interaction users can have with those notifications.

Therefore every version of RN Firebase supports notifications via messaging, just we've reworked a load of internal stuff to allow you to interact with those messages and notifications.

What it doesn't support is notifications in the foreground, creating notifications locally from the device or advanced notification features (e.g. Action buttons, images etc). That goes beyond the scope of this library and is what we created Notifee for.

Also, I'm trying to steer away from naming it the notifications module. It's just cloud messaging which has a sub feature of being able to display and handle notifications..

Hope that helps

Ohh okay, I think I get it.

So :

  • React Native Firebase V5 supports notifications (Remote and Local)

  • React Native Firebase V6 supports notifications (Remote)

  • React Native Firebase V5 can be replaced by React Native Firebase V6 (Remote) + Notifee (Local and new advanced notifications features)

And Notifee exists because Firebase (Local) Notifications should never be included on React Native Firebase V5 at first place.

Do I understand this correctly? 😅

Yep you pretty much nailed it.

Notifee isn't the only option for local notifications though, its just the one we built.

Great!

(PS : Still on docs trying/testing the new react-native-firebase. I found a confusing sentence about notifications. You said : "The module also provides basic support for displaying local notifications". But based on we said before, Messaging are displaying Remote Notifications?)

Here is the link: https://rnfb-docs.netlify.com/messaging/usage#what-does-it-do

Capture d’écran 2020-03-29 à 18 20 02


Off topic but just found some issues on images in the docs (on iPhone XS)

IMG_B2FF0171DE97-1

Yeah wording needs reviewing, that should be remote.

Also thanks for flagging that, I'll get it sorted.

Was this page helpful?
0 / 5 - 0 ratings