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

How to get Firebase Messages Token Synchronously

In the last Firebase version, this method is deprecated FirebaseInstanceId.getInstance().getToken() Is there any new function that I can use to get token synchronously? Important: onNewToken() method does not work for me
Mladen Rakonjac
  • 9,562
  • 7
  • 42
  • 55
4
votes
1 answer

Property 'remoteMessageDelegate' not found on object of type 'FIRMessaging *'

I'm working with some Swift and FCM code and after updating pods I'm getting two errors. I have done research but can't figure out what to do to fix it. Here is the code: // For iOS 10 display notification (sent via APNS) [UNUserNotificationCenter…
user10998289
4
votes
2 answers

send FCM to a particular version of your android app

how to send FCM (Firebase Cloud Message) to a particular version of your android app? for example:- my app's latest version is 2.0 and i only want to send notifications to devices having version 2.0.
4
votes
3 answers

Custom push notification sound not working in Oreo background

I have below payload push notification, send from my server. The notification work in all version, but the sound don't work only on Android Oreo, other Android versions work fine. { "to" : "d4DLcrilLbs...", "notification" : { "body" : "This…
4
votes
3 answers

Custom recurring notifications not being set from firebase console

I am trying to send customs notifications every 3 days at 9.00 pm according to recipient time zone. But publishing or saving the notification causes an error by saying There was an error saving the campaign. Which is pretty vague. Note that this…
hasn
  • 749
  • 6
  • 21
4
votes
2 answers

Do I need to migrate GCM to FCM on client side?

I have the old android app on Play Store which I am not going to update anymore because of making a new app. Do I need to migrate GCM to FCM in my old android app? Many sources say: You have to change your client side... blabla... etc... but GCM…
4
votes
0 answers

Flutter App - FCM - Android not sending Notifications

I have stepped through all the steps here twice over. https://github.com/flutter/plugins/tree/master/packages/firebase_messaging I even deleted and re-paired my android package with FCM. I have the right intent added to the manifest xml... and…
Kirby
  • 1,980
  • 3
  • 21
  • 33
4
votes
1 answer

Overriding onNewToken and getting tokens from firebase errors

I want to retrieve my token and i'm doing exactly as many examples says On FirebaseMessagingService i have this @Override public void onNewToken(String token) { super.onNewToken(token); Log.e("Refreshed token:",token); …
Alex
  • 1,816
  • 5
  • 23
  • 39
4
votes
1 answer

Storing FCM tokens online

I am working with an iOS app which calls an Firebase cloud function, to store FCM tokens, for later use when sending notifications. The problem is that it does not work. I am using a Cloud Firestore database. When the function is called, here is…
Michel
  • 10,303
  • 17
  • 82
  • 179
4
votes
1 answer

what is Device Registration ID for firebase fcm and where I can extract them?

from pyfcm import FCMNotification push_service = FCMNotification(api_key="") registration_id = "" message_title = "Uber update" message_body = "Hi john, your customized news for today is ready" result =…
Harshit verma
  • 506
  • 3
  • 25
4
votes
2 answers

didReceiveRemoteNotification not called, When app is killed

I have an app implemented with fcm . I can receive push notifications in all cases, that works good. But didReceiveRemoteNotification is not call if app is terminated / kill by user. if app is in background or for-ground it is calling. App is…
Gamsh
  • 545
  • 4
  • 21
4
votes
1 answer

Flutter Firebase Cloud Messaging Custom Sound

I want to play a custom alert sound when I receive a notification from Firebase Cloud Messaging in Flutter, is there a way of achieving this?
spongyboss
  • 8,016
  • 15
  • 48
  • 65
4
votes
0 answers

Expected OAuth 2 access token while importing VAPID Push subscriptions into Firebase

I am trying to import vapid push subscriptions into firebase. I found some solution in https://developers.google.com/instance-id/reference/server#import_push_subscriptions. It thew following error. Please help me regarding this. POST :…
4
votes
0 answers

fcm push notifications not received on all devices when send in a for loop

I am using fcm to send push notifications to mobile devices including both ios and android. I have a table in firestore that has device ids of the registered users. I loop through that table and send push notifications to mobile devices. I am using…
4
votes
4 answers

The provided registration token is not registered

I'm trying to send push notification for iOS via Google cloud functions but it returns error that The provided registration token is not registered. But I've checked it by debugging my app and the FCM registration token is correct. After that I've…