Android Studio how to make notifications with Firebase - android

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!

Related

Receive notification from the application when it reaches the desired value

I opened this topic to learn the best way and get advice from you.
I have a cryptocurrency app. For now, I'm only showing the instantaneous values of certain tokens with the help of an API. What I want to do is add a reminder. For example, to be more descriptive, I would like the user to be notified when the value of a token reaches the value he has set.
I have a few questions at this point:
For this, would it be better to keep the data that the user added to
receive notifications in SQLite or should I use firebase?
Will there be any issues if I trigger notifications via Firebase
Cloud messaging?
Can I communicate between Firebase Database and Cloud Messaging?
How can I constantly check the token values received with the help
of the API while the application is closed?
These are my questions, I would be very happy if someone who is knowledgeable on this subject can help me draw a roadmap or architecture.

Can I use onesignal to trigger change order status automatically?

Can I use Onesignal to send a notification of order changes to an Android device then if the user already opened the application on order's page/view the notification will be not shown but the order status on that page will be changed?
If yes, can I know the reference of documentation/tutor? If no, what are alternative ways to do it?
I have a project using Onesignal to send the notifications to the android devices. Currently just Simple notif, but my boss asked me to make the mobile app can auto change status order without user action. I'm a backend engineer, not an android dev so I don't know what really works of Onesignal in android. I just know Onesignal can be used to send the notification but what about data process after notification sent?
This is what I understood: Your app has some kind of market or something from which people can order stuff. So, you want to know if OneSignal can send automated notifications as the order status changes?
If I have got it correct, my best guess will be, no. OneSignal can only manually send out notifications. The closest one can get with OneSignal to automations is scheduling notifications to be sent later. To achieve your purpose, your Android devs will probabaly have to write some code on their own and integrate it some way with the order status and all. Or else, your boss will have to appoint a few people who can track the order of the people and manually send out notifications to them using OneSignal (but, identifying the correct device might not be so easy).
That's my guess. But, OneSignal's support team is pretty nice. They might take a few days to answer, but, it's worth asking them if they can help your developers integrate the order status and OneSignal's notifications in some way.

Notify my users automatically using firebase

I designed movie program that let user to select specific movies to let him follow any new news about it. For any important article i notify my user using firebase notification but how to make it automation to notify any one of them about any specific movie or category ?
according to my googling i can do that using google app engine but i am not sure !
There are multiple routes to go about what you are looking for. All of them will require you to set up a server, either on app engine or something similar, that continuously updates your database with new information. I would not rely on just data change events on your database in your app to do notifications though. I would look into Firebase Cloud Functions as well as Firebase Cloud Messaging where you wait for something in the database to change with a function, which then pushes the notifications with cloud messaging.

Android - How to make push-notifications in android

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

How to send a notification when Firebase database has been updated?

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.

Categories

Resources