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.
Related
I am using Firestore as a database for my flutter app. Some actions on my app lead to change/update in Firestore data.
I am using Flutter native notifications which are generated once a button is clicked. However, the data passed to the notification remains constant despite the data having been updated later in the Firestore.
I would like to implement a feature similar to the one present in sport apps where the live score is updated regularly in the notification.
How can I achieve that in my app? Do I have to use Firestore Cloud Messaging? Citing resources would be helpful.
What you want to achieve sounds like an ideal case for Firebase Cloud Messaging to be used. I recommend that you take a look at the FlutterFire documentation for Cloud Messaging both overview and usage, which should give you a good starting point.
Alternatively you can also use a Cloud Function as the host of FCM and only configure your app to receive messages, you can watch this video for insights on how to create the Cloud Function side.
I'm new to react native and I need some help.
I need to implement a feature that the application informs the client if it has an appointment on the day and if it does, notify him, if not, not notify.
However, I believe that the application needs to check in the API if it has any scheduling and if it has to check if it is on the scheduling day and if it is, send a notification to the client
Correct me if I'm wrong
I'm using react-native-push-notification
But I can't make the logic for this to happen, I can offer my code so they can help me
Suggestion:
You can opt to go with the react-native-push-notification with firebase so that You can able to send the push notification whenever you want through the blackened.
Firebase documentation:Cloud Messaging
I'm using firebase as database. Flutter responds when any changes are made in cloud while using app, but will is respond the changes even when the app is in background or killed?
Second: is it possible to create notifications within the flutter app without using Firebase notification feature? Like a new document is added in database and app is suppose to create notification using some specific lib from pubdev.
When the user is not actively using the app, the OS (Android or iOS) allows a very limited amount of network activity from that app. For this reason you'll typically stop receiving updates from Firebase once the app is backgrounded, and you won't receive any updates as soon as it's killed.
If you want to show updates to the user when they're not using the app, that typically takes using Firebase Cloud Messaging. With this scenario you:
Set up custom server-side code that listens to the database. This code can run on your own server, but also for example on Cloud Functions.
When this code detects a change to the data, it sends a message to the relevant user(s) through Firebase Cloud Messaging.
This requires that the app registers itself either in your database (with its FCM token) or for a certain FCM topic to receive updates about.
For more on this, see the Firebase documentation on Cloud Messaging, Cloud Functions, my answer here and the FlutterFire docs.
I integrated Firebase Cloud Messaging with Unity successfully and I can receive usual messages when I send them from Firebase Console, but I need some extra things.
1 - How can I send my notification as a URL? I mean I want that when user touches the notification it opens the URL that I put in the value in FireBase Console.
2 - How I can send and show a picture and a custom icon in the notification?
Unfortunately, I can't find anything on the internet and official documents confused me.
Is there any way to gain these request only with FireBase SDK?
Thank you.
You have to handle all the messages from FCM manually to get all those features you are looking for. I mean you got the general implementation all the stuff, but you need the unique one. All the notification display settings and notification click handlers have to be implemented on the Android native side.
Probably you will find some interesting FCM asset in the Asset Store with nice notifications customization, not sure. But I would recommend you to surf the Asset Store, maybe there will be some useful packages.
I want to notify updates from server to a set of android applications. I want to know whether it is possible with Firebase push notification service without manually registering the apps. If it is not, please help me with any other solution.