0

I am trying to send a notification to the user at the time he wants it but don't know how to do it. May I get some help?

I tried searching across the web and expected an answer but no one had answered it yet. I found one question similar and it had only one answer which points to https://firebase.google.com/docs/notifications/

  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Dragonthoughts Jan 21 '23 at 14:20
  • There is no public API to schedule sending messages through FCM. You can either schedule sending messages in the Firebase console, or you'll have to create your own scheduling solution. – Frank van Puffelen Jan 21 '23 at 18:02

1 Answers1

1

There are a few ways to schedule Firebase notifications:

Using Cloud Functions for Firebase: One way to schedule Firebase notifications is by using Cloud Functions for Firebase. You can write a function that sends a notification at a specific time using the Firebase Cloud Messaging (FCM) API and schedule it to run at the desired time using the built-in Scheduler for Cloud Functions.

Using Firebase Cloud Scheduler: Firebase Cloud Scheduler is a fully managed cron job service that allows you to schedule function invocations. You can use it to schedule a Cloud Function that sends a notification at a specific time.

Using Firebase Realtime Database: Another way to schedule notifications is by storing the scheduled time and message in the Firebase Realtime Database, and then creating a Cloud Function that listens for changes in the database and sends the notification when the scheduled time arrives.

Using Firebase Cloud Firestore: You can also use Firebase Cloud Firestore, to schedule a notification. You can create a collection of scheduled notifications, where each document represents a notification to be sent at a specific time. And then you can create a Cloud Function that listens for changes in the collection and sends the notification when the scheduled time arrives.

komto909
  • 187
  • 1
  • 10