skip to Main Content

Sending Notifications to Mobile Devices with Firebase Cloud Messaging (FCM).

The admin will be able to send notifications through one Android app, and there will also be a second Android app that can be installed by multiple users, but they will only be allowed to receive notifications. (using the Latest Firebase Cloud Messaging API (HTTP v1)).

It’s working for me with one app that sends notifications and receives notifications in the same app, but I need above scenario

2

Answers


  1. You will need to have a server in between that sends the notification since the second app cant get the notifications from the first app.

    You will have to send something to a server then have the server send out the notification to the second app with all the second apps keys and such

    Login or Signup to reply.
  2. The official documentation of Firebase Cloud Messaging on how does it work?, clearly states that:

    An FCM implementation includes two main components for sending and receiving:

    1. A trusted environment such as Cloud Functions for Firebase or an app server on which to build, target, and send messages.
    2. An Apple, Android, or web (JavaScript) client app that receives messages via the corresponding platform-specific transport service.

    You can send messages via the Firebase Admin SDK or the FCM server protocol.

    Please note that there is no way you can simply send notifications from one device to another. You always need a service in between the devices that does that for you.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search