Firebase Cloud Messaging (When App is closed or just opened)

NeocomerNeocomer GBMember ✭✭

I was wondering, I have managed to implement the currently in beta xamarin firebase messaging into an PCL app. it works as intended when sending a message while the app is in the foreground and in the background but if the app is closed using background applications task manager the message doesn't seems to miss the app. I was wondering if any one has any pointers or knows how to send a message to an app while closed or if firebase is able to hold a message until the app is opened?

Best Answer

Answers

  • JoseOtavioJoseOtavio USMember

    @Neocomer I´m using this package to receive the notification and it´s working fine! https://github.com/rdelrosario/xamarin-plugins/tree/master/PushNotification

  • NeocomerNeocomer GBMember ✭✭

    Thanks , i'll get to trying to implement this at once.

  • iManchaiMancha ZAMember ✭✭

    @JoseOtavio Are you using that package with Firebase, and no Google Cloud Messaging Service?

    I'm using Firebase notifications, it works but simply displays a push notification with no Title or Body content.

    The parameter definitely comes through, debugged it and got this:

    [0:] Message Arrived:{
    "google.c.a.udt": "0",
    "google.sent_time": "1486481416380",
    "gcm.notification.e": "1",
    "google.c.a.c_id": "removed by me",
    "google.c.a.ts": "removed by me",
    "gcm.n.e": "1",
    "google.message_id": "removed by me",
    "gcm.notification.body": "testing push",
    "google.c.a.e": "1",
    "collapse_key": "com.appint.appname"
    }

  • NandhaRexNandhaRex USMember ✭✭

    @DhruvGohil Thanks for you answer..Its woked fine for me in FCM

  • xqbanyolxqbanyol ESMember

    Tips:
    In my droid app, using Xamarin + PCL + Mvvmcross, notifications are received from FCM. Using FirebaseMessagingService in foreground and background execution, but for when the app is closed, as the documentation expresses, the data is transferred to the launching intent as extras. By exploring the extras in the Splash activity, I have been able to detect that I have a notification and process it successfully, once you have clicked on the icon in the notification bar, and the application launches.

Sign In or Register to comment.