Push notification to all users in firebase [duplicate] - firebase

This question already has answers here:
Firebase Cloud Messaging - Send message to all users
(2 answers)
Closed 3 years ago.
I am trying to send a push notification to all users in my firebase app.
is there a way to do it without using a topic?
I have tried doing the following request:
{
"to":"/topics/all",
"data":{
"message" :" {My message}"
}
}
Any help is appreciated!

If you absolutely can't use a topic, then you will need to collect all the device ID tokens from all your users' app installations, then send the message directly to all those tokens. But I suspect it will be easier to user a topic instead of writing all that code.

Related

How to send flutter push notification to specific user? - Flutter Cloud Messaging [duplicate]

This question already has answers here:
Can we send custom push notifications to independent users using Firebase?
(1 answer)
Can I use specific token for firebase?
(2 answers)
How to send notification to specific users with FCM?
(2 answers)
How to send one to one message using Firebase Messaging
(5 answers)
Closed 1 year ago.
I want to send a notification for users who have made certain operations in my application. So I just want to send notifications to certain people, the options to send to a certain community already exist in firebase. I personally want to send notifications to some users. Is there a specific way or method for this?

Can I use fcm to send push notifications to other users? [duplicate]

This question already has answers here:
How to send one to one message using Firebase Messaging
(5 answers)
Closed 1 year ago.
I'm building a photo app where users can press like. Assume there is a user A and B. I need to show a notification when user A press like to user B. User B (app can be either in background or terminated) must get a push notification something like "Hey you got a like".
is it a good idea to use fcm in this situation?
if so how to accomplish these?
Referred links:
Restrict FCM Notification for a specific users in Flutter
https://firebase.flutter.dev/docs/messaging/usage
3
This is possible with firebase push notifications.
But its not possible to trigger this from client-side. You could accomplish this with a cloud function...

Firebase Push Notification Delivery Receipt [duplicate]

This question already has answers here:
FCM Notification Delivery Report
(2 answers)
Closed 4 years ago.
Is there a way to know if a Firebase push notification has been successfully delivered to a user's mobile device? If this is not possible via Firebase out of the box, is there any workaround for this?
There is no built-in delivery receipt. If you want such a thing, you can build it yourself though:
Send only data messages, so that all messages are delivered to your application code.
Send a delivery receipt from your code back to your server, e.g. writing it into a Firebase database.

Is there a way to inform server about bounced push notifications [duplicate]

This question already has answers here:
How can I know that a Firebase Cloud Messaging token is out of use?
(2 answers)
Closed 4 years ago.
Is there a way to inform server about bounced push notifications, so I can remove remove device tokens and reduce number of push notifications that server send.
If by bounced you mean the device intentionally rejected the notification, then no. There is currently no feature like that in FCM.
If what you mean is to identify if the token is no longer valid, then you just have to look out for NotRegistered errors.

Can we push only data message from Firebase Notification console [duplicate]

This question already has answers here:
Unable to send data message using firebase console
(4 answers)
Closed 6 years ago.
I have implemented FCM successfully in my project.
Is it possible to push only data message from Firebase console.
Unfortunately, no. When sending messages through the Firebase Console, it will be treated as a notification payload and will be handled as such.
You can however, include custom key-value pairs in the Advance Options section in the console, this will be treated as a part of the data payload. But the message will be treated as having both Notification and Data payload.
If you insist on sending a data only payload, you should make use of the FCM REST API.

Resources