healthjoy / async-firebase

The lightweight asynchronous client that makes interaction with Firebase Cloud Messaging oversimplified.
MIT License
37 stars 14 forks source link

[Question] Can this library be used for receiving messages? #48

Open alexisgaziello opened 1 year ago

alexisgaziello commented 1 year ago

Is your feature request related to a problem? Please describe.

I am setting up a server, and I would like to be able to receive messages. The two scenarios where this could come in handy are:

  1. integration testing, the server can be used to mock an android/ios device.
  2. I need to connect to a specific instance of a server, let's say, the raspberry pi on my home, easily.

Describe the solution you'd like A similar solution as we have for iOS, Android, Flutter, etc. You can register your device, get a token, and receive messages quickly.

Additional context Maybe that's already possible, but the doc seems more focused on sending messages to mobile devices, hence my question. There is some documentation in Firebase for enabling this in a cloud server, but I didn't fully understand it: https://firebase.google.com/docs/cloud-messaging/server

akalex commented 1 year ago

@alexisgaziello thanks for raising this question, Currently, this is not possible, however, let me spend some time getting familiar with a feature you would like to have.

alexisgaziello commented 1 year ago

Might not be trivial. I found this unmaintained project that does it: https://github.com/Francesco149/push_receiver