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
38
votes
12 answers

FirebaseCloudMessaging : PlatformException (PlatformException(null-error, Host platform returned null value for non-null return value., null, null))

I'm trying to send notifications from an Node.js API to a Flutter application. First, I want to make my application able to receive notifications from Firebase. But, when I initializeApp, I got an issue : PlatformException…
Shiroe
  • 497
  • 1
  • 4
  • 9
38
votes
4 answers

W/FirebaseMessaging: Missing Default Notification Channel metadata in AndroidManifest. Default value will be used

Our app now has targetSdkVersion 26 (Android 8) and the app uses FCM push notifications. When app is in the foreground state the push notification is working well. The issue appears while clicking the notification when the app is not in the…
38
votes
11 answers

Firebase maximum projects and apps

How many applications can I create in one project from a single account and how many projects I can create in Firebase for Cloud Messaging?
Erum Malik
  • 749
  • 3
  • 9
  • 17
38
votes
6 answers

FCM background notifications not working in iOS

I have a problem with FCM notification on iOS. I receive notifications with success when my app is in foreground (the callback didReceiveRemoteNotification in appdelegate is fired), but I don't receive notifications when the app is in background (I…
38
votes
3 answers

Push notification works incorrectly when app is on background or not running

I am using Firebase Cloud Messaging to send push notifications. Here is my FirebaseMessageService: public class FireBaseMessageService extends FirebaseMessagingService { @Override public void onMessageReceived(RemoteMessage remoteMessage) { …
37
votes
13 answers

FirebaseCloudMessaging : FirebaseInstanceId background sync failed - SERVICE_NOT_AVAILABLE

I have use Firebase Cloud Messaging(FCM) API for the push notification in Android. When I implemented that time perfect work but now it's can not find the Service of google play. the error is: FirebaseInstanceId: background sync failed:…
Chirag Parmar
  • 1,064
  • 2
  • 13
  • 29
36
votes
3 answers

Android: Delay in Receiving message in FCM(onMessageReceived)

In Test app, I have implemented FCM for sending notification messages using https://github.com/firebase/quickstart-android/tree/master/messaging For testing I sent the message(8:42 PM) from firebase console using the "New Message" under…
karsas
  • 1,231
  • 4
  • 12
  • 24
35
votes
7 answers

Firebase Error: Auth error from APNS or Web Push Service

After running the following line in node-js: import * as admin from "firebase-admin"; import * as serviceAccount from "../../firebase_service_account_key.json"; const app = admin.initializeApp({ credential: admin.credential.cert(serviceAccount as…
Seph Reed
  • 8,797
  • 11
  • 60
  • 125
35
votes
2 answers

FCM remote notifications payload for iOS and Android

We are using FCM to send remote notifications for both iOS and Android. The following are the payloads we are sending from the backend. options = { notification: { title: "title", body: body, sound: 'default' …
35
votes
2 answers

Android: Subscribe to Firebase Cloud Messaging(FCM) Topic

According to Firebase cloud messaging documentation, for subscribing a user to a topic I need to call FirebaseMessaging.getInstance().subscribeToTopic("news"); In my application, I need all users to be subscribed to my cloud messaging topic. Since…
VSB
  • 9,825
  • 16
  • 72
  • 145
35
votes
2 answers

FCM Schedule delivery date or time of push notification

I have working with FCM console to send push notification and it has an option to schedule the delivery date. But in the references, this API is not documented as an option. I need to know if its possible to push a notification with predefined…
34
votes
0 answers

FCM Vs GCM? Why we need to migrate from GCM to FCM

Hello Friends I am new to this stackoverflow community, but have wide experience in developing code using various programming languages like android. Today I was implementing GCM with one of my application, I was facing some problem of delay in push…
33
votes
3 answers

Flutter: FCM Unhandled Exception: Null check operator used on a null value

E/flutter (26872): [ERROR:flutter/lib/ui/ui_dart_state.cc(199)] Unhandled Exception: Null check operator used on a null value E/flutter (26872):…
chichi
  • 2,777
  • 6
  • 28
  • 53
33
votes
8 answers

Class 'MyFirebaseMessagingService' is not abstract and does not implement abstract base class member public abstract fun zzd(p0: Intent!)

Here I have used FirebaseMessagingService in Kotlin but when I run the project it will give me the following error: Class 'MyFirebaseMessagingService' is not abstract and does not implement abstract base class member public abstract fun zzd(p0:…
Nilesh Panchal
  • 1,059
  • 1
  • 10
  • 24
33
votes
10 answers

InvalidApnsCredential while certificates are valid

I'm trying to send a message to my push notification test app. It's been working in proof of concept several weeks ago on the same application but not anymore. I get a failure: InvalidApnsCredential and Firebase tell us : "A message targeted to an…
SeikoTheWiz
  • 853
  • 1
  • 10
  • 27