Implementing FCM (Firebase Cloud Messaging) on a M

2019-05-03 11:40发布

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 e.g a new product gets added to the web app

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

Any advise would be helpful!

1条回答
Viruses.
2楼-- · 2019-05-03 11:52
  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. :)

查看更多
登录 后发表回答