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

onTokenRefresh is not fired in rnfirebase Library for React Native

this.onTokenRefreshListener = firebase .messaging() .onTokenRefresh(fcmToken => { // Process your token as required console.log("fcmToken onTokenRefresh", fcmToken); console.log("fcmToken onTokenRefresh client", client); // await…
4
votes
5 answers

Apache cordova Build failed on implementing firebase : Dependency failing

this is the Error [ What went wrong: Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[19.0. 1]",…
4
votes
1 answer

How to send two Recurring Cloud Message every week one after another and repeat again from Firebase Console?

I want to send two messages every week one after another and repeat the process again to our app from Firebase Dashboard. I see there is a scheduling system for sending the message, but I am new in Firebase. I can't achieve this. Please help me. My…
manas paul
  • 87
  • 7
4
votes
4 answers

Flutter - Firebase Messaging Snackbar not showing

This is the problem: notification is received by the app both with app in foreground or background (or terminated) but the snackbar for notification when the app is used doesn't work. I'm new in flutter so maybe I did some huge mistake. I am…
Dark Helmet
  • 81
  • 1
  • 6
4
votes
0 answers

How FCM(Firebase Cloud Messaging) works under the hood?

I must develop a Push Notification service like Firebase Cloud Messaging service or other similar services. But I don't have any knowledge about this. My questions are: How FCM works under the hood? Does it uses Socket Programming to achieve a…
Jack Jaki
  • 77
  • 5
4
votes
2 answers

FirebaseInstanceId.getInstance().getToken() deprecated how to save token in DB

i wan't to know how to implement the new FirebaseInstanceId.getInstance().getInstanceId().addOnSuccessListener into my own code so i can retrieve the token and save it into the database to use FCM and identify every user. Actually i have the…
arieliito
  • 157
  • 2
  • 9
4
votes
1 answer

Error in adding firebase messaging to flutter?

I want to add firebase messaging to my flutter app and I want to register the plugin in application.java but my app gets stuck at Installing build\app\outputs\apk\app.apk... and when I try to launch it gives me an error that it keeps stopping. the…
the coder
  • 400
  • 1
  • 9
  • 17
4
votes
0 answers

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

Describe the bug the function onResume and onLunch not working on android platform, while they work fine on IOS, i receive the following message on console instead of printed strings in those functions: "W/FirebaseMessaging(24847): Missing Default…
4
votes
0 answers

React Native Firebase ios onNotification doesn't trigger

My project is importing 'react-native-firebase' and I'm trying sending test messages through firebase console using a device token. The method firebase.notifications().onNotification((notification)=>{}) triggers on android devices, but doesn't…
4
votes
1 answer

How to play youtube video in flutter?

How to play youtube video in flutter? I tried two plugins but there were some bugs in them. youtube_player plugin (https://pub.dev/packages/youtube_player) gives exoPlayer error for some videos & those videos are not played using this plugin (see…
4
votes
1 answer

How to search and send notifications to people nearby in flutter firebase app?

I need a way to search for people nearby and send them a push notification. Doesn't seem like I can use topics for this, so probably need a way to query for users?
4
votes
0 answers

FCM: How to bring the app from background to foreground?

I have an app in which I am using FCM (Firebase Cloud Messaging). As given in the README, I've managed to get it all working and the event handlers for onResume, onMessage, onLaunch are all firing properly. The onBackgroundMessage which I think is…
Amit Joki
  • 58,320
  • 7
  • 77
  • 95
4
votes
1 answer

How do you get client-side firebase cloud messaging token into google cloud function?

I'm working towards implementing push notifications that appear on change to a firebase firestore document. I'm using the react-native-firebase module. My google cloud function listens for changes to the firestore and then sends messages via…
4
votes
0 answers

Using FCM Data package to refresh a Flutter screen

I am using Firebase Cloud Messaging to push Notifications to my flutter app. Now i want to refresh a Screen if a data package arrived. But i only want to do this, if the user is currently watching a specific screen. Is there a chance to get the…
Lukas
  • 490
  • 3
  • 15
4
votes
0 answers

Firebase v1 HTTP api does not support nested JSON objects

CURRENT SITUATION We send a POST request Firebase legacy URL https://fcm.googleapis.com/fcm/send to deliver notification JSON payload to our Android application. Our notification payload is a nested JSON object within a standard data. Our sample…
Kartik
  • 2,541
  • 2
  • 37
  • 59