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
1 answer

Firebase number authentication not working after uploading app to App Store

I have developed an app that verifies a user by their phone number using Firebase phone number authentication. The Android version is working correctly after it was published of Google Play but the iOS version does not receive SMS messages, despite…
4
votes
1 answer

FirebaseInstanceId: Failed to resolve target intent service

I'm trying to run my app on the device but it crashes on the first activity. It's Login Activity and it seems like my app simply can't connect to the Firebase and it causes a problem. Logcat says: E/FirebaseInstanceId: Failed to resolve target…
4
votes
1 answer

Ionic 3 FCM open specific pages when notification tapped when app is in background/closed

I can get the push notification when my apps is on background/closed and I can get the data in the payload of the notifications when i tapped it and open "notification": { "title": "Chat Messages", "body": `You have received chat messages…
4
votes
2 answers

Firebase Push Notification sent, but onMessage() not firing

I am sending a push notification from Postman. I've got the Authorization and Content-Type headers set and my Body looks like this: { "to" : "faecDTf47y4:APA91bEsGFDeKQtifs-XXXXXXXXXXXXXXXXXXXXXXXXXXX", "notification": { "title":…
4
votes
1 answer

FCM notifications not received when phone enters deep sleep

I have a problem with FCM functionality. When the phone is awake everything is working (notifications are received when the app is in foreground, background or even if the app is dead). The problem starts when the phone is entering deep sleep. As…
Daveron
  • 67
  • 1
  • 6
4
votes
3 answers

TypeError: admin.firestore(...).collection(...).doc(...).collection(...).doc(...).get.then is not a function

I'm trying to code a function that triggers when a user gets a new comment and sends a notification.Comments are stored in /Users/{userID}/Notifications/{notificationID}. Users save their device notification tokens to /users/{userID} This is the…
4
votes
4 answers

set FCM high-priority when using firebase-admin

I have the following code which uses firebase-admin to send messages using Firebase cloud messaging Message message = null; message = Message.builder().putData("From", fromTel).putData("To", toTel).putData("Text", text) …
david
  • 997
  • 3
  • 14
  • 34
4
votes
3 answers

Not Seeing "Opened" Firebase Notification Stats

I'm manually handling firebase notifications by overriding the onHandle intent of the FirebaseMessagingService. And using the intent I generate a notification. Is there a way to manually report the notification opened to the Firebase at all because…
4
votes
4 answers

FCM - Push notification works only in console not in postman

My application developed in NativeScript. For FCM I use nativescript-plugin-firebase. I have received a push notification whenever I tried from the FCM console. But, I never received a push notification when I try from post man as below. URL : POST…
Muthukumar Marichamy
  • 1,175
  • 1
  • 17
  • 39
4
votes
1 answer

How to send FCM notification to all android devices using Node.js

I want to send the notification to my Android app developed using Ionic t from Node.Js code. I have tried following code and getting Exactly one of topic, token or condition is required. How can I send notification all my users without any…
4
votes
0 answers

Firebase Cloud Messaging: click_action doesn't work

My service worker file has the following code and I am sending CURL request which has data and notification key value is inside data: curl -X POST -H "Authorization: key=MY_KEY" -H "Content-Type: application/json" -d '{ "data": { "image":…
4
votes
3 answers

how to show badge number and sound after receiving push notification via Firebase Cloud Messaging?

I am trying to implement push notification via Firebase Cloud Messaging to my iOS app. I can set the firebase console and APN perfectly, I can get the notification that sent via Firebase console in my device. but, when I get the notification, it…
Alexa289
  • 8,089
  • 10
  • 74
  • 178
4
votes
1 answer

How to handle differrent payload of notification to Android and iOS in a same time using php FCM?

I using FCM to send notification for Android and iOS apps via my php server.Just because the different payload need by different platform,now I facing a big problem. Now my payload structure look like this "registration_id":[all my firebase token…
ken
  • 2,426
  • 5
  • 43
  • 98
4
votes
2 answers

Fire-base web notification not received while no errors

I am working with web app in which I want to integrate Firebase Notifications but after I setup all the requirements I tried to use Firebase notification composer to test it, I got no errors and the status of the message was completed but I received…
Peter Wilson
  • 4,150
  • 3
  • 35
  • 62
4
votes
1 answer

Firebase cloud messaging `onMessageReceived` not being called?

I'm testing Firebase cloud messaging. I have the following class public class MyFirebaseMessagingService extends FirebaseMessagingService { @Override public void onMessageReceived(RemoteMessage remoteMessage) { Log.d("From: ", "From:…
david
  • 997
  • 3
  • 14
  • 34