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

Android can't extend Firebase Messaging Service

I am trying to implement Firebase Cloud Messaging in my application, I had implemented all settings to use this service, but when I try to extend FirebaseMessagingService in my class it gives me error and it can't find it at all, I can't even import…
Saleh Refaai
  • 689
  • 3
  • 14
  • 25
23
votes
5 answers

Chat App for Android using a XMPP Server and Google Cloud Messaging (or the newer Firebase Cloud Messaging) for Push Notifications

I'm developing a Chat App for Android. I have been reading for weeks about XMPP and Google Cloud Messaging (and Firebase Cloud Messaging) and I am still very confused. Currently, I already setup an XMPP server locally (Ejabberd) and successfully…
22
votes
1 answer

Apple Push Notification service server certificate update

On March 29, 2021, token and certificate-based HTTP/2 connections to the Apple Push Notification service must incorporate the new root certificate (AAACertificateServices 5/12/2020) which replaces the old GeoTrust Global CA root certificate. To…
22
votes
1 answer

Updating FCM Token on Flutter App

I have a Flutter app that creates a FCM Token on the first run, like this: _firebaseMessaging.getToken().then((token) { //save my token here }); However, I understand that this token can be refreshed once in awhile. In order to get this new…
Notheros
  • 2,137
  • 9
  • 23
  • 34
22
votes
6 answers

Unresolved class 'MyFirebaseMessagingService' Android Studio

I have problem with Firebase in Android studio. Here is what happen: In debug mod everything is working fine with follow AndroidManifest
Arsayu
  • 358
  • 1
  • 2
  • 10
22
votes
5 answers

How to handle multiple Firebase FCM tokens per user?

From the official documentation I understand that the way it works is something like this: User installs app, FCM token is generated Sending token to app server Server uses token to send push-notifications to this device. What if at the same time…
Graykos
  • 1,281
  • 3
  • 20
  • 31
22
votes
4 answers

How to send FCM (firebase cloud messaging) push notification from ADB to device

We are using firebase cloud messaging to get the push notification into android app. Currently to test push notification we need to send the message to FCM server and wait for the message to arrive to device. Most of the time device is taking long…
22
votes
2 answers

Use of undeclared type UNAuthorizationOptions

I am trying to use Firebase to handle push notifications. I have installed Firebase pod ('Firebase/Core' and 'FirebaseMessaging' pods). And after I imported Firebase to the project import Firebase I have configured the Firebase app like this( code…
22
votes
3 answers

How to send Device to device notification by using FCM without using XMPP or any other script.?

Is there any way to send Upstream notification message through FCM from one android device to another devices connected with Firebase database. I know that XMPP server can then receive the upstream messages and send the notifications to the other…
Vishal Patoliya ツ
  • 3,170
  • 4
  • 24
  • 45
22
votes
2 answers

Is FCM (firebase cloud messaging) Token for one device or for one account?

I want to store FCM token in my android app user's table in database when user register to the app . When i want to send notification to specific user then i will fetch Token from corresponding row and send push notification.But i am confused that…
21
votes
5 answers

how to navigate when click background notification on Flutter?

Is it possible to navigate to a specified path when clicking background FCM notification? I created a Top-Level function and add it to the navigator path but its not working, when clicking on a background notification, it just opens the app I GUESS…
BIS Tech
  • 17,000
  • 12
  • 99
  • 148
21
votes
3 answers

Is FCM token refreshed on app update?

I am using FCM in my android app for push notifications. I have the below class to get the fcm token. public class MyFirebaseInstanceIdService extends FirebaseInstanceIdService { @Override public void onTokenRefresh() { String…
anurag bhowmick
  • 351
  • 1
  • 3
  • 6
21
votes
4 answers

FCM (Firebase Cloud Messaging) Send to multiple devices

I execute this code to push notifications to mobile device using FCM library public string PushFCMNotification(string deviceId, string message) { string SERVER_API_KEY = "xxxxxxxxxxxxxxxxxxxxxxx"; var SENDER_ID = "xxxxxxxxx"; …
Tawfiq Dawod
  • 213
  • 1
  • 2
  • 6
21
votes
6 answers

Grey square as notification icon using Firebase notifications

I am attempting to integrate Firebase Cloud Messaging into my android app. But when the app is in the background or closed, Firebase notification is displayed with grey square icon instead of my application's launcher icon. How could I make the…
Sophia
  • 213
  • 1
  • 2
  • 7
21
votes
5 answers

IOS data notifications with FCM

I am using FCM (firebase cloud messaging) to send "custom" data notifications to an IOS app. From what I understand, we use notification messages when you want FCM to handle displaying a notification on your app's behalf. And we use data messages…
Shayan C
  • 1,510
  • 1
  • 13
  • 21