简体   繁体   中英

Implementing FCM (Firebase Cloud Messaging) on a MVC Web App

I am developing a MVC Web App. The app will provide a platform for people to sell products and allow people to then search for an view these products.

I have no experience of what functionality Firebase FCM can provide. So my two questions are:

  1. Can FCM be added to a MVC App to send push notifications to Android and IOS phones when a triggered by an event eg a new product gets added to the web app

  2. If it can be added to the Web App how customizable are the notifications eg can a notification be sent based on different type of events eg can different notifications be sent when different types of products are added to the web app?

Any advise would be helpful!

  1. Yes... but it's up to you to write the code to do this. That is, you'd need to have some kind of process on your side (probably on a server) that's observing the data powering your web app, or your web app could do the work itself to "trigger" this process when it changes. (It really depends on how everything is structured.) This process could then submit a FCM notification that would go to all your mobile clients.

    There is currently no way for this to happen automatically. That is, if you're hoping for some kind of "Hey, Firebase, send off a notification through FCM when you notice that a new child is added to your database" functionality, that's something that does not currently exist.

  2. Since you'd be writing the code to create the notification, you can customize as much as you'd like. :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM