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

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.

Related

Can we send notification request to Firebase? [duplicate]

This question already has answers here:
How to send device to device messages using Firebase Cloud Messaging?
(14 answers)
Firebase push notification device to device
(1 answer)
How to send one to one message using Firebase Messaging
(5 answers)
Closed 8 months ago.
I'm developing an app in react native using firebase and I can't find if it is possible to send notification TO firebase.
More precisely, I want to send some kind of notification request to firebase so Firebase send notifications to devices.
Does anyone know how to do it?
You're probably looking for Cloud Messaging.
What you'll need:
A server to use FCM admin SDK (you can use Firebase Cloud Functions as well)
The device's FCM token that you want to send the notification to
Also take a look to In-App messaging.

Push notification to all users in firebase [duplicate]

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.

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.

How to programmatically get FCM sent, opened, and converted reports? [duplicate]

This question already has answers here:
Firebase notification records/log API
(2 answers)
Closed 4 years ago.
Firebase Cloud Messaging has a UI to see the sent, opened, and converted stats for a single message sent. Additionally, it has a downloadable CSV of counts for number of messages sent, displayed and opened for a given day.
Is there a programmatic API to get all of these stats so they can be integrated into a larger analytics system? Or is the UI and the CSV the only source for this data?
There is currently no API to get the reports data (sent, opened, converted) from FCM. However, there's been a recent improvement in the Firebase Notifications console where stats (sent count only for now) for messages sent using the FCM API is included in the Firebase Notification console stats. From my answer in the duplicate post:
As of August 2018, stats for messages sent using the FCM API are now visible from the console. From the Cloud Messaging section, click on the Reports tab. From there, you will be able to filter by message type (notification, data, and all)
It would seem that the Impressions and Opens are still only available for messages sent using the console. But Sends for sure now counts the messages sent using the FCM API.
Reference: https://firebase.googleblog.com/2018/08/in-app-messaging-crashlytics.html

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.

Resources