shawn1912
shawn1912

Reputation: 162

How to trigger push notifications in Flutter app using FCM without using the Firebase Console?

I want to create an event management app in which the admin can create new events and the client can book seats for the event.

What I want to achieve is that when the admin creates a new event, a push notification (Even if the app is not open in the background) should be received on the client app.

I have been trying to send notifications through FCM (Firebase Cloud Messaging). But that is working only when I click the Publish button on the Firebase Console. How can I code it so that a push notification is fired automatically when the admin creates a new event?

Upvotes: 0

Views: 1371

Answers (1)

prahack
prahack

Reputation: 1599

If you use the Firestore or Firebase real-time DB to store events, you can use a Firebase cloud function to send push notifications. Read more about cloud functions here https://firebase.google.com/docs/functions/use-cases

Upvotes: 1

Related Questions