This question already has answers here:
FCM Schedule delivery date or time of push notification
(2 answers)
Closed 6 years ago.
I'm integrating push notifications in an app I'm developing. I have chosen to use Firebase Cloud Messaging (FCM) to support both Android and iOS.
When using the console to send a push message I see there is an option to delay the actual sending of the push notification. However when checking the HTTP docs I can't seem to find this option.
How would I schedule a notification so it is send at a later time using FCM and the HTTP API?
Unfortunately, as of the moment, there is no API or even a parameter that you can use in order to schedule a notification.
It can only be done either (as you already know) in the Firebase Console or implementing a delay until the schedule in your own App Server.
Related
This question already has answers here:
Is there a way to delete push notification data message sent by FCM?
(2 answers)
is there a way to remove or recall a push notification sent by fcm
(1 answer)
How to Delete already sent Remote push notification with firebase in iOS?
(3 answers)
Closed 4 months ago.
We are using firebase in a web project where have .net as our backend, and we send push notifications using firebase cloud messaging to our users' android and IOS devices.
When sending notifications to firebase and the user device is offline, the notifications can't be delivered and the notification status will be pending according to firebase documentation.
I want to know if there is a way we can cancel these pending notifications and stop them midway to the user's devices.
This question already has answers here:
How to send one to one message using Firebase Messaging
(5 answers)
How can I send a Firebase Cloud Messaging notification without use the Firebase Console?
(17 answers)
Closed 2 years ago.
This might be a duplicate questions, but still. I have seen many tutorials on sending notifications from Firebase Cloud Messaging to an android app, but I don't understand how to send notifications from my angular website to firebase, which will then push these notifications to android app. In all these tutorials, they have sent notifications by manually typing messages in the firebase UI.
My question how do I send notification data from my angular website to FCM, which will then send these notifications to my android app? Any references for this? Any procedure to follow?
In your case, you might consider having your own app server that will provide an API for your angular app to send notification. Here's a documentation on how you can send a notification to a device from your server.
https://firebase.google.com/docs/cloud-messaging/send-message
There are different parts of this implementation actually. First, your app server needs to provide an API to the Android app that will be used to send the firebase registration token from your app when the app is launched. You might consider storing those registration tokens in your backend database.
Then the other API that your server will provide, to send notification, can be integrated in your angular app. The server API should be able to find the exact registration token of the device where you need to send the notification and will call the API from FCM to send the notification to the device. Here's the API doc that you might consider taking a look into.
https://firebase.google.com/docs/cloud-messaging/http-server-ref
Here is a good tutorial that shows how you can implement the server side implementation to send the notification.
https://www.pluralsight.com/guides/push-notifications-with-firebase-cloud-messaging
This question already has answers here:
How to send device to device messages using Firebase Cloud Messaging?
(14 answers)
Closed 4 years ago.
How do I send notification from an android device to another device through firebase cloud messaging?
I do not want to use the administrative panel of firebase for sending notifications, I just want to send from one device to the other.
FCM doesn't provide device to device communication, you will have to achieve through App Server or use FCM endpoint to send messages.
Do you have App Server implemented? which sends notification through FCM.
Approach 1:
If App Server is there then you can follow: https://firebase.google.com/docs/cloud-messaging/android/upstream and add logic in App Server to send notification.
Approach 2:
You could use Firebase Remote Config to share FCM server keys, and make Http request from android client.
This question already has answers here:
How to send Device to device notification by using FCM without using XMPP or any other script.?
(3 answers)
Closed 5 years ago.
Is there a way to send push notification between 2 android devices without a server?
I found some tutorials but all of them was using the node.js for sending a notification. (Or I found that some samples that were using the firebase console for doing this)
Nope,
You need a "server" to do push notification. You can use a variety of services to do that, as you mentioned firebase is one of them. You may not need a full on server, but you need some kind of service to do that, you can't simply send notifications between devices straight away:
Some examples are:
AWS Serverless functions
Cloud functions in firebase
If you'd rather use one of these services, then you'll need to configure FCM in your app, you can check how to do that in the docs. And some nice sample codes here :)
This question already has answers here:
How to send device to device messages using Firebase Cloud Messaging?
(14 answers)
Closed 6 years ago.
I am developing a chat app using firebase real-time database. I am able to exchange messages but i want to have a message alert notification for new messages.
Sending notifications using firebase console is working but now i want to automate it without firebase console.
Do i need to create my own app server for push notification between android clients? Or is there another way to achieve this instead of creating a server?
Thank you
Firebase realtime database is very useful precisely for its "realtime" aspect.
You could create a Service that listens for changes in the database and create a Notification whenever the client receives a new message.