I want to notify android users(students) whenever they got failing grades. I tried using Firebase notification, but what I can do about it is to manually type messages in my firebase account and send it to users. I want to send notification to specific users automatically depending on the condition in my codes. Thanks in advance.
I suggest you to start with Firebase Notification
Less code and reliable
You can start with code sample
https://firebase.google.com/docs/samples/#android
and find the Cloud Messaging sample
You can also archive this by using Realtime Database that will provide data changed listener every time data is added/updated. And you can take this advantage of the listener to notify your Notification in Android
Related
Can someone help me?
I want to notify all the users who installed my app. I was going to firebase cloud messaging and I am pushing a notification from there. But I want to create a button that collects the information from my textfield and push a notification to all the users.
I have been trying this for 24+ hours but I have found no solution.
Thank you.
Hello I find one solution for this issue
You need to:
Get an server API key from the firebase console.
Create local Api service sent web key as authentication.
Use (User token) to send notification on specific devices. Need to add notification data as raw data will work.
Add web key in authentication
Add notifcation data
Add sender data
Click This link to check detailed solution!
I need to create an alarm system in android that controls when a value reaches a predetermined limit send me a notification.
I have no idea where to start, I saw tutorials for onesignal, firebase and android, I could implement an example with onesignal and from the onesignal page I can send a notification and receive it from my application, but what I don't know how to follow is how to connect with my database and get the value that indicates that I have to send an alert.
Can someone tell me what to look for? How to guide me?
Best regards.
You need to send push notification to an Android client, for example when the product price is lowered to 50 USD. So you need to check the changed price and when the price is changed and the new price is suitable for informing your Android client, you can use OneSignal Create Notification API. Of course you can use another tool like Firebase etc. You can send push notification via OneSignal API, Create Notification method from any platform. You can check it and if this scenario is good enough for your requirement then you can try it.
I'd like to make notifications with Firebase when the Firebase Database is modified. I guess this could make with Firebase functions and Firebase Cloud Messaging, but I don't know if this way is correct or not, please if someone can help me clarifying this doubt, below I explain that I want my application to do, thx!!
I want my app to send notifications all the users near the another user(1km for example) when this user publish an ad.
As fellow developers, I encourage you to boldly try whatever comes up in your mind!
But if I were you, I'd do the same thing. Firebase Functions allow you to have function trigger according to Firebase Realtime Database events. So you can use that, to trigger a specific function that will send a FCM Message.
In your Android App, make sure to implement FirebaseMessagingService (and set it up in your AndroidManifest.xml), and every time message is received (through FirebaseMessagingService.onMessageReceived), create new notification!
Is it possible to generate a push notification (if the app is not in the foreground) on firebase db changes? I started coding an android app.
Firebase provides a tool called Cloud Functions.
With this, you can listen to your Firebase Database and send Notifications without the need for an external server :)
See : https://firebase.google.com/docs/functions/use-cases
To do it in a simple way, you can use a Service, in this Service you can set a Listener on a ref in your firebase DB when the event is triggered you can create a notify and show it to the user.
This is a very simple tutorial:
https://www.simplifiedcoding.net/android-push-notification-tutorial-using-firebase/
There certainly is. Just have your Android app write the notification request into the database.
Sending device-to-device notifications is not a supported scenario in Firebase Cloud Messaging (see this answer), so you'll need a server component for that. For an example of how to send a push notification in nodejs, see this answer.
The latest launch of Firebase notifications feature allows to manually give the time and content of notification. Is it possible to automate it so that notification is received every time a particular variable is changed in the Firebase database?
Thanks for the reply Hamid. I didn't want to get into the technicalities of GCM therefore I implemented the notifications using a service. This service listen on the Firebase database and sends a notification whenever new data is added there.
I think you would have to setup a GCM (Switched to FCM now) server that handles all that. But I also do wish that there was a simple way of setting that up without needing to build a full server.
There is a friendlyping application that helped me set the XPMM server.
I think the current Firebase Notifications are very much in its early days. It doesn't provide many of the functionalities of Batch.com or Parse Server... yet.