69
Views
3
Comments
[Cloud Messaging Plugin (Firebase)] Send Notification to the multiple devices from web (Firebase)
cloud-messaging-plugin-firebase
Mobile icon
Forge asset by OutSystems
Application Type
Mobile, Reactive
Service Studio Version
11.54.43 (Build 63110)

Hello Community,

I'm struggling with Firebase Cloud Messaging while sending notifications to multiple devices from web portal. Here I'm sharing you What I'm trying to achieve. 

1. Mobile application (SendNotify) where I'm saving device information into the database via CreateDeviceInfo server action (which is available in core module - GetDeviceInfo)


2. This is the web application (SendNotificationToUser) where I'm showing the list of devices in which above application is installed. From here I'm sending the notification which ever device I want to send.

This is the SendNotification button click.

There are multiple devices saved in DB, but I can be able to send the notification only this device (Nokia 7 plus) whether it is selected or not. Notification always triggers on Nokia 7.  

I hope you understand my problem. Looking for some solution. Any help will be appreciated. 

UserImage.jpg
Ricardo Silva

Hey @PrinceKumar,

After analysing your post, I have a few questions:

  1. Regarding the screenshot that displays the `SendNotificationToUsers` Server Action call, I noticed that you're filling the UUID on the `SendToPlatform` argument instead of the `SendToUsers`. Why is that?
  2. Why are you triggering one call per user instead of multiple?
  3. Still related to the 1st question, why are you using the UUID and not the FCM Token?

Best regards.

2024-06-24 04-49-49
Princi

Thanks @Ricardo Silva for the response. As I gone through some document/content I got to know that FCM token should be trigger into the server. 

But is there any way how I can register the device token in firebase console and how to retrieve token from console? 

I'm referring this please check the below image for reference. This is RichNotification (Sample app for firebase cloud messaging)

UserImage.jpg
Ricardo Silva

I believe you can follow a similar approach to what is done with the Sample App, with the main difference being the `RegisterUserToken` Server Action, which, if it makes sense, should probably send the retrieved information to your backend. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.