I'm using react-native-push-notifications
npm package to deliver the local notification to the user. Since the local notification will affect only one user, I have to use the remote notification service for all users. But I have read guides in which most of them are telling like we have to log in to FCM console and send notification from there.
However, in the context of my application, I'm trying to send a notification programmatically from the app to all users who have installed the app. Is it possible using react-native-push-notification
to send to all users without sending directly from FCM?
Current code for local notification
const localNotification = () => {
PushNotification.localNotification({
autoCancel: true,
largeIcon: "ic_launcher",
smallIcon: "ic_notification",
bigText: "Hi, user. You have a new order",
color: "green",
vibrate: true,
vibration: 300,
title: "New Order",
message: "Received a new order",
playSound: true,
soundName: 'default',
actions: '["Accept", "Reject"]',
});
};
This notification is affecting only one user. How can I send the same to all users since it's not possible to log into FCM and send notification each time.