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
45
votes
5 answers

Migration from GCM to FCM needed?

Google just announced that Google Cloud Messaging is now Firebase Cloud Messaging. What does this mean for existing users of GCM and what migration (if any) are needed?
44
votes
3 answers

Flutter- FCM A background message could not be handled in Dart as no onBackgroundMessage handler has been registered

I wanted to handle the background message of the FCM in the Flutter, but I got an error when FCM sent a message to the app in the background mode and made an error in the log. pubspec.yaml: firebase_core: ^0.7.0 firebase_messaging:…
Taleb
  • 1,944
  • 2
  • 11
  • 36
44
votes
2 answers

What is the difference between Firebase Cloud Messaging and Firebase In-App Messaging

What is the difference between Firebase Cloud Messaging and Firebase In-App Messaging? They both send notifications to your app that something has happened. I took a look at their docs and these are their one-line descriptions: Firebase Cloud…
CoderUni
  • 5,474
  • 7
  • 26
  • 58
44
votes
1 answer

Firebase Cloud Messaging where to find PUBLIC VAPID KEY

I'm implementing Push Notification for Web App via Firebase and follow this guidelines from Google https://github.com/firebase/quickstart-js/tree/master/messaging On index.html I see this code // [START get_messaging_object] // Retrieve…
Bùi Đức Khánh
  • 3,975
  • 6
  • 27
  • 43
44
votes
4 answers

what is "serviceAccountKey.json" referring to in the Firebase device-to-device notifications tutorial

I managed to go through the complete Firebase Android Codelab without too much problem, the app works perfectly. Now I would like to add device-to-device notifications. I found this tutorial: And some things are not clear to me. In the node script…
44
votes
3 answers

Firebase FCM Usage Limits

I was wondering if there is a comprehensive list that privides details of the various Firebase FCM usage limits. I knew of the Data message payload limit of 4KB maximum. and then recently I got some issue with my app and then figured it was due to…
44
votes
4 answers

Open app on firebase notification received (FCM)

I want to open application automatically when notification is received, is this possible with Firebase and new FCM notifications? I know I can set click_action but that's only for customizing which activity will start on notification click, I need…
43
votes
9 answers

Unsubscribe from all topics at once from Firebase Messaging

Is there any way to unsubscribe from all topics at once? I'm using Firebase Messaging to receive push notification from some topics subscribed, and somehow I need to unsubscribe from all topics without unsubscribing one by one. Is that possible?
Lennon Spirlandelli
  • 3,131
  • 5
  • 26
  • 51
42
votes
9 answers

Flutter Firebase Messaging Not working on IOS when app running in background or closed

I have configured firebase Cloud Messaging with flutter Notification are working in foreground. but not working when running in background or app is killed. Following steps are done. Generated app ID and push Key…
max
  • 1,505
  • 3
  • 15
  • 38
42
votes
15 answers

Firebase Expandable Notification Show image when app is in background

I am implementing FCM notifications in Android, but how does notifications differ depending on the app status (background vs. foreground)? I am sending the notification using the FCM API with Postman and this is the notification structure: {…
42
votes
2 answers

How to send notification to specific users with FCM?

I prepared the receiver for FCM and can send a notification to all devices. gcm-http.googleapis.com/gcm/send with this link can send to target users who is registered and post to the target devices like below json : { "notification": { …
41
votes
2 answers

How to handle the Firebase notification when app is in foreground

I have integrated Firebase Cloud Messaging with my application. When I sent a notification from the Firebase console, if the app is in background or not opened I receive successfully the notification, otherwise if the app is in foreground or opened,…
Uma Achanta
  • 3,669
  • 4
  • 22
  • 49
39
votes
4 answers

Unable to send data message using firebase console

I'm using firebase console and can send only Notification messages using it. Is there a way to send data messages using the same?
amodkanthe
  • 4,345
  • 6
  • 36
  • 77
39
votes
5 answers

Firebase Cloud Messaging with Ionic app

I am developing android/ios app using ionic framework (web technologies) and I want to add Push Notification with the help of new firebase feature FCM. Right now I am looking at following docs:…
39
votes
6 answers

Send push notifications from server with FCM

Recently I asked a question on sending push notifications using GCM: Send push notifications to Android. Now that there is FCM, I am wondering how different it would be from the server side development. Coding wise, are they the same? Where can I…
user3573403
  • 1,780
  • 5
  • 38
  • 64