0

I want to broadcast notification to multiple devices instead of adding FCM token of each device. Currently, I am sending notification using Firebase cloud messaging to send a notification but in that, I have to add FCM client token for each device, but what I want is to broadcast message without collecting client device FCM Token.

Following versions are being used in my app ''' "react-native": "0.55.4", "react-native-push-notification": "^3.1.3", '''

0

2 Answers 2

2

You have to options:

Option1:

You can create a device group and send push notifcations to a group of devices. Read more in the docs iOS device-group and Android device-group. Of course, here you need to know the id of the group.

Option2:

Create a topic, where your devices need to subscribe to. Then you can publish directly on topics. Unfortunately subscribing to topics is only supported for android when using react-native-push-notification, see react-native-push-notification#android-only-methods

Sign up to request clarification or add additional context in comments.

Comments

0

As originally answered by Tim you have two options.

If you don't mind changing your notification library, you can use react-native-firebase. It covers most of the available Firebase features and is well-maintained.

Here's the setup guide for subscribing to topics

1 Comment

how can I send notification to user login devices Like iPhone, iPad, desktop, android. all 4 devices send notification in a single click.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.