Questions tagged [firebase-cloud-messaging]

Firebase Cloud Messaging (FCM) is the new version of GCM. It inherits the reliable and scalable GCM infrastructure, plus new features. It is a cross-platform solution that let user reliably deliver and receive messages and notifications at no cost. It supports Android, iOS, Desktop Web Browsers, the Mobile web with JavaScript or WebPush and Internet-of-Things (IoT) devices.

About Firebase Cloud Messaging

Firebase Cloud Messaging is a component of the Firebase suite of tools for cross-platform application development.

  • Send unlimited upstream/downstream messages
  • Send messages to individual devices or a user segment
  • Handle all aspects of queueing and delivery
  • Optimize for battery efficiency

Using FCM, you can notify a client app that new email or other data is available to sync. You can send notifications to drive user reengagement and retention. For use cases such as instant messaging, a message can transfer a payload of up to 4KB to a client app.

How does it work?

An FCM implementation includes an app server in your environment that interacts with FCM via HTTP or XMPP protocol, and a client app. Additionally, FCM includes the Notifications console, which you can use to send notifications to client apps.

Firebase Notifications is built on Firebase Cloud Messaging and shares the same FCM SDK for client development. For testing or for sending marketing or engagement messages with powerful built-in targeting and analytics, you can use Notifications. For deployments with more complex messaging requirements, FCM is the right choice.

Related tags

12555 questions
4
votes
1 answer

Is there a way to receive data notifications in flutter when the app is killed?

I am trying to implement custom ui for push notifications in android (title, body, image loaded from url), the firebase_messaging dart plugin has a limitation for receiving data notifications when the app is killed. using data payload instead of…
Caroline
  • 63
  • 1
  • 6
4
votes
2 answers

How Firebase Push Notification is send to device

I am trying to figure out how Firebase connect to specific devices and send message to it. I now how to use Firebase and send notification to registed devices from my backend server but i don't know how is it working internally. Is firebase severs…
4
votes
0 answers

Not seeing notification report for messages that are sent by firebase-admin sdk

I am using firebase-admin SDK to send the message to devices. The device can receive the message. I go to the firebase console to see the report of these messages, but I can not see any information about the message that I just sent. So Am I missing…
4
votes
2 answers

Android: Save FCM Notification to Room DB

I am using firebase FCM to get the notification. I want if the notification received, that should store in my RoomDatabase. Later on, when the user opens the app, then in notification section all notification will display. I am using MVVM, I was…
4
votes
1 answer

Application crash upon receiving a notification

I'm trying to setup a push notification system, to do that, I'm using Firebase Cloud Messaging with Pusher. I followed this tutorial, in order to implement it. When setting up FCM, I was able to send notifications from FCM's dashboard. Then when I…
Kairos
  • 41
  • 3
4
votes
0 answers

What FQDN should be allowed in order to send Firebase Push Notifications from a Server?

We have a web server running Yii2 (PHP) and are trying to send push notifications using the aksafan/yii2-fcm-both-api https://packagist.org/packages/aksafan/yii2-fcm-both-api Sending push notifications works fine locally, so it's not a programming…
4
votes
1 answer

How to fix " [FirebaseMessaging] Unable to log event: analytics library is missing" in Xamarin.Android

I want to do FCM in Xamarin.Android. So I following this tutorial (Xamarin.Android)Remote Notifications with Firebase Cloud Messaging to do. but my phone can't receive message. my output get : [FirebaseMessaging] Unable to log event: analytics…
4
votes
1 answer

Firebase messaging, Failed to determine project ID for Messaging

How can I initialise my app for messaging? I keep getting the error "Error: Failed to determine project ID for Messaging. Initialize the SDK with service account credentials or set project ID as an app option. Alternatively set the…
Bomber
  • 10,195
  • 24
  • 90
  • 167
4
votes
1 answer

Problem accessing Google API protected with OAuth2 by using LWP::Authen::OAuth2

I am currently coding a service on a perl server, that shall send a request to the Firebase Cloud Messaging API, which will then send push notifications to an app instance. Since FCM is part of the Google API family, an OAuth2 token is required to…
procra
  • 535
  • 4
  • 29
4
votes
1 answer

apns-collapse-id option not working in FCM

I'm trying to implement APNS notification where i want to maintain single latest notification for all my incoming notification. I'm using apns-collapse-id which should be supported by FCM as described here…
4
votes
1 answer

Pinpoint/FCM returning Unregistered or expired token

I'm using Pinpoint to push notifications through FCM and I'm receiving an error back from AWS: { "ApplicationId": "xxx", "RequestId": "yyy", "EndpointResult": { "5551212": { "DeliveryStatus": "PERMANENT_FAILURE", …
4
votes
3 answers

double push notification created with React Native + Expo + FCM

I'm trying to create an app that can receive push notification. The push notifications are sent using AWS SNS and using FCM token rather than Expo's Token. The notifications were received, however, every notification was received twice by the system…
4
votes
4 answers

Unable to send silent push notifications to iOS using FCM

I'm attempting to send a silent data notification to an iOS device using node.js module firebase-admin 7.0.0 and the following code: // load lib var firebase = require('firebase-admin'); // add API keys firebase.initializeApp({ credential:…
4
votes
1 answer

Firebase Cloud Messaging : Expiration of FCM token

I understand that the FCM token renews itself if one of the following happens. -The app deletes Instance ID -The app is restored on a new device -The user uninstalls/reinstall the app -The user clears app data. The following can be used at the App…
vzurd
  • 1,416
  • 2
  • 15
  • 37
4
votes
1 answer

How to get Firebase user id from FCM token? (in admin code on server)

My signed-in Android clients register their tokens with my server. The problem is I am not sure whether the token sent by a particular client genuinely belongs to that client user id. A bad client could register valid tokens of other users. Given an…