Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Rajiv Shah
    Lucas Bento

    you can send data only notification and build your own popup in notification callback.

    @evollu: I'm kinda trying to achieve the same, the app doesn't receive anything on FCM.on(FCMEvent.Notification, function()) if I send only data without notification

    Libin Lu
    @lucasbento did you "content_available" to be true?
    Lucas Bento
    @evollu: yep, my payload is:
        "to": "token",
        "priority": "high",
        "data": {
            "badge": 1,
            "alert": "New data is available"
        "content_available": true
    I'm trying to receive it even if the app is on background
    that way seems to work with the app running
    I'm trying to parse the incoming notifications and show them with presentLocalNotification()
    John Haupenthal
    Hello everyone. This will probably seem dumb. I've got FCM installed and notifications are showing up in my emulator (though only when the app is in the background). Where do I paste the code from the Usage section in the doc? I am basically trying to figure out how to access the methods associated with the notification, ie what file or new file should receive that code?
    Libin Lu
    @johnhaup check the example solution in the repo
    John Haupenthal
    Will do! Thanks

    hi..can anyone tell me the solution for: I'm sending notification from C# code

    to: "fcm_token",
    notification: {
    body: "your order is okay",
    title: "Brg - Your order"
    body: "your order is okay",
    title: "Brg - Your order",
    I'm receiving notification on ios. I'm performing some actions in FCM.on(FCMEvent.Notification, notif => { method.

    this.notificationListener = FCM.on(FCMEvent.Notification, async (notif) => { is only called when iOS app is in foreground not in background. When opening app clicked from notification this is never called.

    I've added content_available:true but it didnt helped as well
    Julius Kamiri
    Hello everyone. I have managed to implement notifications with this great library but I am experiencing this evollu/react-native-fcm#721. Anyone with info on how to go around this?
    Petar Ivanov

    Hello everyone,
    I am facing a terrible issue and I can't find its solution for several hours ... :(
    I am trying to integrate react-native-fcm with noncocoapod approach in existing react native project with already configured react-native-fbsdk. I followed all steps on the README file both at the github repo and the Firebase SDK dir but with no success.
    In my Xcode project I have 'Frameworks " dir and I have putted all frameworks from Firebase SDK - Analytics & Messaging there and also Firebase.h & module.modulmap files. When I build the project I face this error:

    In file included from /Users/petarivanov/Projects/appointments/appointments/node_modules/react-native-fcm/ios/RNFIRMessaging.m:1:
    /Users/petarivanov/Projects/appointments/appointments/node_modules/react-native-fcm/ios/RNFIRMessaging.h:4:9: fatal error: module 'FirebaseCore' not found
    @import FirebaseCore;

    I've also tried several variations in organizing imports, files and directories but no one helped me to solve the problem.
    I will be glad if anyone could help me with this annoying problem.

    Suvodeep Pyne
    Am running into errors getting fcm to work with react-native 0.52.*. Anybody else facing any issues?
    Derek Schultz
    i think i might have changed some package versions and react-native-fcm stopped working. what versions of react/react-native/react-native-fcm are you all using that work together?
    anyone have used react-navigation & react-native-fcm in the same project. For navigating to particular screen on notification click I've to register FCM.ON and FCM.getInitialData on every screen. Since I'm trying to register events ion App.js & call this.props.navigation.navigate on the same place it is not working. Any solution or sample Project?https://stackoverflow.com/questions/48869820/navigating-user-on-notification-click-app-in-background-foreground
    Ravindra Joshi
    I facing issues
    when notification receive that device not vibrate and not sound
    plz give me solution
    vibrate: 500,
    title: notif.title,
    body: notif.body,
    priority: "high",
    sound: "default",
    show_in_foreground: true
    i have set this code
    Thibault Malbranche
    Hello, I recently released my app to production, and one of my user got a weird issue, getFCMToken was null, even after the app was running for quite some time. Tried re-installing and other stuff. It was on a Huawei p10 lite. Seems to be working great for everyone else :)
    Any idea was might cause that
    Kholiavko Roman
    Hi guys. Did you know, does FCM token have some validity period ?
    I have many users that has device id token, but FCM returns "error": "NotRegistered"
    Libin Lu
    @kholiavko-roman FCM token could change in certain cases. make sure you check the token frequently or listen to change event
    Kholiavko Roman

    @evollu Thanks for reply!
    So I need to check if token has changed - send it to my server, yes ?
    But my users can open app very rarely, for example some users open it once at month. What I should do in this cases ?

    And did you know in what exactly cases FCM token has changes on the devices ?

    Libin Lu
    firebase has documentation about firebase token change.
    what I do is storing current token locally checking if token has changed every time user launch the app.
    Kholiavko Roman
    Ok, thank you. I will do something like that.
    hi @all
    On Android phone, when i restart device, all local notification are pushed at the same time. How do i fix it?
    Hey @all @evollu
    In the file FIRMessaging Module.java we are registering receiver on react context and not unregistering when app is unmounted. Is that ok if don't unregister the re
    can anyone tell about react-native-fcm with react-native-maps
    i got a error
    can anyone have a source code
    José Antonio Jiménez
    Hi anyone is having issues with HTTP v1 Firebase API? I am receiving notifications on Android, but not in iOS
    when I click on the notification from notification bar it is not navigating me to the corresponding screen. Here is the notification payload that I am getting {fcm={action=android.intent.action.MAIN}, opened_from_tray=1.0}
    any update on the above issue?
    Anybody tried push notifications using react native firebase

    i have two FCMEvent.Notification in one i am presenting the notification and in one i am doing some kind of data manipulation both listener is in different component.

    Problem is in iOS both listener is calling twice where as in android its working as expected

    Hey Guys
    I am facing small issue and clueless how to solve it. Thanks in advance for help
    'FCM.on(FCMEvent.Notification, notif' event gets triggered every time android app is brought to foreground from background
    Alexey Bratushka
    Hey, is this room even live?
    Hey Guys