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. :)
Related
I'm setting up a React Native app to, essentially, send messages between devices (it's not a chat app in practice but technically that's what it's doing). I've decided to use Firebase and the RN Firebase library to manage this.
I've finally got my iPhone receiving notifications from the Firebase notification composer. But it's saying I need an XMPP server in order to send messages from devices.
I do see the example in the RN Firebase docs but I'm hoping to do this app severless, just using Firebase for messaging, db, what have you.
I'm going through docs on Firebase (searching their site for XMPP) but it's not quickly clear, so I'm posting here to see if anyone can point me to instructions to quickly set this up in Firebase itself without running my own server (or that someone would know whether it's possible).
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.
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
I have developed a simple android app using Firebase database to store stuff.
Now, I want to set up notifications for each time a button is clicked.
Each time the button is clicked, it will take some info from firebase (text mostly) and will send a notification to anyone who downloaded the app.
I understood that simply creating a notificationManager won't work as needed.
I also heard about Firebase Cloud Messaging but im pretty new to this so I must know what I should start learning to make that work out.
So, if you have any good tutorials or anything helpful, that would be great!
Thanks!
You need to receive for the FCM in android app. Refer this doc. And you need to can use database triggers in firebase cloud functions to send FCM notification, or you need to deploy a cloud http function to do so.
I'm trying to configure Firebase Messaging in Flutter, but it seems that there is no implementation yet for the Upstream messages.
https://firebase.google.com/docs/cloud-messaging/android/upstream
What I want to do is to add a reminder and notify the user after x time with a push notification.
Let me know if you guys have any other solution, or we should simply wait for Flutter and Firebase for Flutter to became stable.
Thanks
Alvin
You are correct that there is no implementation for upstream messaging in FlutterFire yet, we are working on filling out these features. However given your use case you may be able to do something like write the user's reminder to Firestore or Firebase Realtime Database then when you are ready to send push notifications you can use Cloud Functions for Firebase to send the messages to the required devices.