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
27
votes
18 answers

FCM push notification issue: "error":"NotRegistered"

I am getting weird issue of sending push notification to Android using FCM. Goal :- Having error while sending push notification Below is the scenario I do have function for sending push notification to Android public static function…
Shashank Shah
  • 2,077
  • 4
  • 22
  • 46
27
votes
4 answers

Firebase FCM silent push notifications for iOS

I have a problem with silent notifications on iOS. When my application is in background, I don't receive silent notification sent by FCM. But if I try to send directly to APNS, the notification is successfully received. This is the JSON sent to…
27
votes
6 answers

Firebase Notification Always shows blank icon

I'm new with FCM. I cannot make FCM use my app icon as notification icon and the icon is always a white blank one. I imported an icon to mipmap folders but nothing seems changed. As some dude say that this is because of lollipop notification as in…
26
votes
5 answers

firebase-messaging - Fatal: failed to find callback

I'm trying to use FCM messaging and keep getting this error. E/FlutterFcmService( 3684): Fatal: failed to find callback Below is the code I've used to setup. static Future messagePiper( Map message, …
tharindu_DG
  • 8,900
  • 6
  • 52
  • 64
26
votes
9 answers

FCM notification message are not received in android Oreo version?

I have send FCM notification from server to users. It works fine(until api 25) but in Oreo when the application have not in background(services are closed) (or) completely closed .I am not getting any FCM notifications at this scenario but in…
Srinivasan M
  • 317
  • 1
  • 3
  • 11
26
votes
5 answers

Android: FCM java.io.IOException: SERVICE_NOT_AVAILABLE error on some devices

I use FCM in my project It work correct on Sony xperia, Galaxy S6, Motorola and more. But on Galaxy S3 i get java.io.IOException: SERVICE_NOT_AVAILABLE error Time of Galaxy S3 is auto and google play is updated Internet connection is strong and i…
Te Me
  • 295
  • 1
  • 4
  • 9
26
votes
4 answers

FCM topic - Cannot subscribe to topic: xxx with token: (null) - iOS

I'm getting this error from Firebase Messaging API: [Firebase/Messaging][I-FCM002010] Cannot subscribe to topic: /topics/testTopic with token: (null) But before: Messaging.messaging().subscribe(toTopic: "/topics/testTopic") I'm printing out the…
anitteb
  • 762
  • 10
  • 21
26
votes
2 answers

Android Notification with FCM - Who started the FirebaseMessagingService?

According to the set up guide here, in a sample app, A) I created a class that extends firebase services class. B) I put these classes in the AndroidManifest.xml A) Java Class public class MyFirebaseMessagingService extends FirebaseMessagingService…
26
votes
3 answers

What is the `Authorization` part of the http post request of Google's Firebase Downstream message?

I want to try to send a message using google's FCM messaging service and as the document says, the http request should be something like this:…
26
votes
8 answers

java.io.IOException: SERVICE_NOT_AVAILABLE in GCM Client

I want to implement an gcm client into an existing android app. So, by following this tutorial I wrote following code: public class RegisterForGCMAsyncTask extends AbstractSecureOperationTask { ... @Override protected Boolean…
25
votes
2 answers

FCM HTTP V1 API returns 404 for unregistered token

FCM HTTP v1 API supposed to return error code "UNREGISTERED" when device is unregistered (app uninstalled). However API returns 404 "Requested entity was not found". Have anyone experienced this? Is this the expected one? There is no mention about…
yottabrain
  • 2,387
  • 5
  • 23
  • 37
25
votes
4 answers

Google Firebase Push Notifications for iOS are not working in production environment

I'm using Google Firebase Cloud Messaging API (FCM) to send push notifications to my iOS app. I could get push-notifications working successfully when I test the app on a device with Development provisioning profiles + development push…
25
votes
8 answers

FCM (Firebase Cloud Messaging) Push Notification with Asp.Net

I have already push the GCM message to google server using asp .net in following method, GCM Push Notification with Asp.Net Now i have planned upgrade to FCM method, anyone have idea about this or developing this in asp .net let me know..
bgs
  • 3,061
  • 7
  • 40
  • 58
25
votes
3 answers

Firebase Cloud Messaging API Key

Any way to regenerate the API Key for FCM (Cloud Messaging section) in Firebase Console? The key is not editable and is different from the one automatically generated in Google APIs Console. Due to this misconfiguration I'm always getting…
Jumpa
  • 4,319
  • 11
  • 52
  • 100
24
votes
4 answers

Firebase instance id: deprecation of getId() in 21.0.0

With the recent release of FirebaseInstanceId and FirebaseCloudMessaging (21.0.0) Firebase has deprecated iid package and both getToken() and getId() methods are now deprecated. According to the Firebase release note the method getToken() is moved…
Mahdi-Malv
  • 16,677
  • 10
  • 70
  • 117