Raudius / Pushraven

A simple Java library to interface with Firebase Cloud Messaging (FCM) API. Pushraven allows you to push notifications to clients in very few lines of code.
MIT License
78 stars 34 forks source link

Web Push notification #14

Closed iosnewbie2016 closed 7 years ago

iosnewbie2016 commented 7 years ago

Hi - thanks for this repo. It is very useful for me for android push notifications. Since FCM can be used for web push notification as well, I was wondering if this library could be used for that as well. Since it needs a server key, and the project in FCM seem to have only one server key, I was not sure how to use it for Web push. Pls throw some light on the same, as am bit new to this. Thanks for your help.

Raudius commented 7 years ago

There is no reason why you shouldn't be able to use it for Web Notifications. Afteral, all this library does is implement the FCM reference (https://firebase.google.com/docs/cloud-messaging/http-server-ref).

If you are using the same firebase project to send to Web and Mobile you might want to consider using 'topics' to distinguish between different clients.