Expo eject and react-native-firebase integration failed - firebase

i tired to make push notification with the normal expo notification and i could get the token but link it with firebase and couldn't send notification from backend,
then i did expo eject so i can use react-native-firebase and i did all steps in the documentation here: https://v5.rnfirebase.io/docs/v5.x.x and all cloud messaging and notification steps from the right sidebar but i got that error in the picture below
Note: I use wordpress as a backend to send push notification

Why do you need to eject if you are using Expo tokens ?
Maybe you can try to upgrade to Expo SDK 37 and use FirebaseCore : https://docs.expo.io/versions/latest/sdk/firebase-core/

First, Expo push notifications is much better than current V6 firebase push notifications, as it will not provide notification data to app, to make it happen, you have to do a lot of circus. If that was the only reason you are ejecting, don't do that.
Second, That error is saying you did not configure firebase properly, follow the instructions properly from the react native firebase doc.

Related

how to send mobile push notification using google firebase

I'm using Moodle framework and I want to send message and notification through firebase any ideas about how to reach that ?
I haven't used it myself so can't give you instructions
But I believe you can use AirNotifier to push to Firebase
Some documentation from Moodle here
https://docs.moodle.org/400/en/Moodle_app_notifications
Github for AirNotifier here
https://github.com/dcai/airnotifier/#readme

Push notification service without showing actual notification in expo

Is it possible to use Expo push notifications (https://docs.expo.io/versions/latest/guides/push-notifications/) without showing actual notification to user?
I want to use Firebase Cloud Messaging to notify user about change in backend and this would be perfect solution that won't require me to eject Expo and use ExpoKit
I couldn't find any info in documentation, but maybe there is some undocumented solution
If it's not possible then do you see another solution that won't require ejecting or it's unavoidable?
I recommend you to use Expo"s backgroundFetch or taskManeger.
It is more beautiful solution, becase user sometimes deny push notification

Can Expo be used with Firebase cloud messaging at all?

Can I use CRNA or Expo with Firebase Cloud Messaging? If so, how? The Firebase JS lib ? Looks like I can but how to make push notification work?
or ExpoKit with Firebase Android/IOS lib?
Thanks!
If you need to use the full Firebase SDK, with Firebase Analytics,
Firebase (rather than Expo) Push Notifications, Firebase Crash
Reporting, and Firebase Links, you will need to eject for the
foreseeable future
https://expo.canny.io/feature-requests/p/full-native-firebase-integration
here is updated document from expo showing they support FCM with Android: https://docs.expo.io/versions/v26.0.0/guides/using-fcm

firebase cloud messaging with react native?

I have a react native project that is already connected to my firebase project. I use firebase as my database. Everything works great. But...
I am trying to get a simple firebase cloud messaging test to work with my react native android app. As I said, I already have firebase in use with my app for db purposes and for authentication.
I am using the react-native-firebase package (http://invertase.io/react-native-firebase) to do all my firebase work. I followed the directions on their site to get the messaging to work, but I haven't had any success.
I have followed the installation directions here: http://invertase.io/react-native-firebase/#/installation-android
All the database stuff works fine, but no luck with messaging. I am sending out test notifications using the firebase notifications console. I get the firebase token using this code in my app.
firebase.messaging().getToken()
.then((token) => {
firebase.database().ref(user.providerData[0].uid+'/agents/'+user.providerData[0].uid+'/fcmToken').set(token);
});
That code successfully gets the token and saves it to my firebase database. I then copy the token manually from my db and use it in my firebase notification console to send out a test notification. I know that the app is supposed to be running in the background. To get my app in the background I simply hit the home button. Then I send my test message. I don't get any errors in the firebase notification console and it says my token I supplied is all good. After a few seconds it says the notification status is completed. However in my app, nothing appears in my system tray, no notifications.
Does my app have to be in production mode or something? Anyone else get react-native-firebase to work with firebase cloud messaging on android?
I use the firebase console to send test messages

Firebase FCM - React Native

Well, I'm new to React Native and Firebase and I have some questions about it. If somebody could help me I would appreciate it!
How react-native-fcm is related to Firebase Notifications Console? Is there a configuration on fcm when implementing that refers to that "notification database"?
On react-native-fcm documentation there's an example that uses:
FCM.subscribeToTopic('/topics/foo-bar');
Is that a reference to Firebase or something? Or it's just a silly question?
There's any way to send a notification when a child is added to Firebase Database?
Thank you!
react-native-fcm I think is a React library to use FCM. Firebase Notifications Console is a part of the Firebase Console where you're able to send push notifications towards your app without the use of your own App Server.
It's a function for sendig messages to Topics.
There is. The recently released Cloud Functions for Firebase sounds like what you're looking for. Specifically, Realtime Database Triggers. :)

Resources