This question already has answers here:
How can scheduled Firebase Cloud Messaging notifications be made outside of the Firebase Console?
(2 answers)
Closed 2 years ago.
I am developing an Android Application where users can decide when to receive notification (user selects exact time to receive firebase notifications).To do this, I need to implement a notification schedule dynamically. Is there any way to schedule firebase push notifications programmatically?
Thank you
1- If your implementation can be handled in local, you can use Notification Manager for this, not remote push notifications. Basically set alarms for your desired times, create notifications in OnReceive method of Alarm manager and notify the system
https://developer.android.com/reference/android/app/AlarmManager
https://developer.android.com/training/notify-user/build-notification
2- If you want to have more control over your notification system and dynamically manage your remote notifications, you can make it via Firebase Admin SDK.
https://firebase.google.com/docs/admin/setup
Related
I want to create a background service on adroid studio, that listen to changes in the realtime database of firebase and trigger a notification in the app. I know that exist cloud messaging, but that solution can't use data of the RTDB to construct the information that goes in the notification. I know how to make a notification in android, but i dont know how to make a service that trigger that notification even when the application is killed. Can you help me?
I am developing an app that allows users to receive notifications from two places: 1) from a calendar event notification and 2) from an alarm/reminder notification. The notifications work when I have the app open but I want them to work when the user has the app closed or not currently running. Is there a way to do this? Please let me know if I need to send any code!
How would I make an app to send a notification if it’s closed?
I’m making an app that reads the data from the web server and I need to send the notification to the user only if the app is closed and the value on the web server is changed.
I have been struggling with this for a while, and finally I had to use Firebase Cloud Messaging.
I am creating an Ionic 2 app with firebase and I need a way to listen to database changes (specifically on child_added) when the app is closed (I.e. in foreground,background and killed)
Basically, I want to use WebRTC to make calls within the app like whatsapp and I am following this post - https://websitebeaver.com/insanely-simple-webrtc-video-chat-using-firebase-with-codepen-demo
However, the only thing that puzzles me is how it will work when the app is closed. Can anyone please help me understand?
Thanks!
It's not possible to actively listen to database changes using the Firebase client SDK in exactly the same way that you can when your app's code is running.
If you want your app to receive information about changes to your database, you can instead use Firebase Cloud Messaging to send your app a notification with a small payload that contains information about the change. When your app receives the notification, it can then make a decision about what to do. There are some limitations with web support, so be sure to read about that.
Also look into Cloud Functions for Firebase to make it easier to write some server side code that can trigger in response to a database change and send a notification when those changes happen.
I want to make real-time notification in my android app, but I don't know how to make it real-time and connected to the database
how to make my app can get/access data change from the database every time the database changing even when we didn't open the app
let's say every time admin sending notification, it will send data to database and it has column "read" and it will set to 0 and then user's app will immediately receive notification where the column "read" is 0, and when user opens the notification it will open an activity and change column "read" from database to 1.
You can use either firebase cloud messaging or user background notification service with web socket connection
There are many ways to achieve this type of real-time communication like,
Socket.
MQTT Protocol.
WebRTC.
Firebase Live Database.
Also, you can achieve this feature by sending notification from your admin panel to the user's mobile devices.
A common way is to implement Firebase(FCM) in your application and on your server. You can see how to implement FCM using this Offical documentation help Link https://firebase.google.com/docs/cloud-messaging/