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
0 answers

FCM WebPush valid token throwing errorCode: "UNREGISTERED"

Problem I retrieve a token through messaging.getToken() and send it a message via the http v1 API. I then receive the following error message: { "error": { "code": 404, "message": "Requested entity was not found.", "status":…
Nick
  • 876
  • 1
  • 14
  • 35
4
votes
6 answers

FirebaseMessaging module not found

When ever I write @import FirebaseMessaging; is says - Module 'FirebaseMessaging' not found What I did - I install the pods with only Firebase/Core, but after that I realised Firebase/Messaging is also necessary to enable push notifications. Then I…
4
votes
3 answers

Firebase Function:Function returned undefined, expected Promise or value

I have written a firebase function to send notification whenever a like occurs in my android app. The notification functionality works good most of the times but sometimes does not work. I receive this error always ( whether it is working or…
4
votes
0 answers

iOS Grouping Firebase Remote Push Notification

We are using Firebase for sending remote push notifications, we are in need to grouping received notification like WhatsApp (Ex: 25 new messages received). I have tried it by adding APNs in JSON, but it's not working. Here is my tried code: { "to"…
4
votes
3 answers

Push notification not working on Android 7.0 (FCM) with release-apk

My android app is live on the store and its push notification stopped working suddenly on > 7.0 android os. Dependencies : 'com.google.firebase:firebase-core:10.2.0' 'com.google.firebase:firebase-messaging:10.2.0' Notification builder code…
4
votes
1 answer

Firebase Cloud Messaging: Why do registration tokens get deleted?

In our app we use Firebase Cloud Messaging to send push notifications to our users. We save the registration tokens of our users in our SQL database and when a user logs in or out we use the Firebase API to manage his topic subscriptions. This works…
Philipp Otto
  • 4,061
  • 2
  • 32
  • 49
4
votes
2 answers

FCM iOS: Push notifications throw invalid argument

I am attempting to implement pushNotifications using Cloud Functions and FCM for iOS but I am consistently thrown this error: 2018-05-21T13:04:00.087Z I sendPushNotifications: Error sending message: { Error: Request contains an invalid argument. …
Koh
  • 2,687
  • 1
  • 22
  • 62
4
votes
2 answers

Google Firebase Admin SDK Service Account Expired?

I am using the google firebase admin sdk and have followed the instructions to set it up. I am sending messages and notifications via FCM and this was working no problem but recently I noticed that our metrics were showing no notifications being…
Rob Evans
  • 6,750
  • 4
  • 39
  • 56
4
votes
2 answers

Firebase FCM: invalid-argument

I'm trying FCM for the first time, so just using their sample code. In fact I'm even sending their sample messages. The following code, which is straight from the documentation (except for the token which comes from their sample messaging android…
4
votes
1 answer

Firebase Invalid registration token. Check the token format

This questions has been asked and answered many times before, yet I can't figure out what I am doing wrong. Sending notifications to the whole app from Firebase console works, but if I send to a single token, I get error in firebase console:…
bibscy
  • 2,598
  • 4
  • 34
  • 82
4
votes
1 answer

Firebase Cloud Function Messaging with APNS Token rather than FCM Token

I am trying to setup a Firebase Cloud Function that will trigger a Cloud Messaging with Payload. The received load by the function however contains Apple APNS Tokens rather than FCM Tokens and I don't see any methods in Firebase Admin SDK allowing…
4
votes
0 answers

Firebase FCM Instance ID Server returns 401/403 error codes

I am trying to implement Firebase Cloud Messaging into a Web App. I am following this guide from Google. I have already implemented the client side and I want to subscribe my client to a topic with the token my client sends to my server. The guide…
4
votes
2 answers

Push notification is not receiving in iOS swift?

I am using FCM for push notification. FCM is connected, device is registered successfully and I am able to print device token but the device is not receiving notification. In general -> capabilities tab -> enabled push notification and remote…
PvDev
  • 791
  • 21
  • 67
4
votes
1 answer

error: cannot access zzb class file for com.google.firebase.iid.zzb not found

Getting error: error: cannot access zzb class file for com.google.firebase.iid.zzb not found after including AccountKit: compile 'com.facebook.android:account-kit-sdk:4.+' Also onCreate & onDestroy is not getting resolved. public…
AskQ
  • 4,215
  • 7
  • 34
  • 61
4
votes
2 answers

Firebase Cloud Messaging - how to add sound to APN

When sending an APN to an iOS device using HTTP v1 API, the Apple documentation states that if apns-priority is set to 10, then Notifications with this priority must trigger an alert, sound, or badge on the target device The documentation at…