Flutter Firebase no notification shown on terminated app - firebase

I am using Firebase cloud messaging for flutter. Everything works as expected, when the app is either open or in the background. But if I close the app (terminated) no messages are received.
I send the messages with the firebase console.
I have tried two emulators, that both had play services installed.I even logged in with a google account in the emulator.
Any ideas what I might be doing wrong?

I set priority to high and it started working. The docs only talk about priority high in the context of data messages but it seems it is important for notifications as well then.

Related

Device-to-device messages with FCM and XMPP

I'm setting up a React Native app to, essentially, send messages between devices (it's not a chat app in practice but technically that's what it's doing). I've decided to use Firebase and the RN Firebase library to manage this.
I've finally got my iPhone receiving notifications from the Firebase notification composer. But it's saying I need an XMPP server in order to send messages from devices.
I do see the example in the RN Firebase docs but I'm hoping to do this app severless, just using Firebase for messaging, db, what have you.
I'm going through docs on Firebase (searching their site for XMPP) but it's not quickly clear, so I'm posting here to see if anyone can point me to instructions to quickly set this up in Firebase itself without running my own server (or that someone would know whether it's possible).

Firebase OnValueChanged Notifications for Unity (Android&iOS)

I have a chat app like WhatsApp in Unity. I want to send user notification when he received any Chat.
What I've tried yet...
I have OnChildAdded Listener but it only works when Scene is Running on Foreground.
Simple Notifications in Unity which only shows notifications after some time delay.
How can I Keep the Firebase OnChildAdded Services running in the background and show a notification to the user when any child is added to the Chats Node? (firebase - realtime)
Unfortunately, Realtime Database will not continue to work in the background (in fact, once your Activity/game is not visible, Android and iOS may kill it to save battery life or free up memory for another app).
If you'd like to send a message to a user when your app is not running, Firebase Cloud Messaging would be the way to go.
There is a rough tutorial that may help here - although it references the Android SDK rather than the Unity one.
I hope that helps!
--Patrick

firebase cloud messaging with react native?

I have a react native project that is already connected to my firebase project. I use firebase as my database. Everything works great. But...
I am trying to get a simple firebase cloud messaging test to work with my react native android app. As I said, I already have firebase in use with my app for db purposes and for authentication.
I am using the react-native-firebase package (http://invertase.io/react-native-firebase) to do all my firebase work. I followed the directions on their site to get the messaging to work, but I haven't had any success.
I have followed the installation directions here: http://invertase.io/react-native-firebase/#/installation-android
All the database stuff works fine, but no luck with messaging. I am sending out test notifications using the firebase notifications console. I get the firebase token using this code in my app.
firebase.messaging().getToken()
.then((token) => {
firebase.database().ref(user.providerData[0].uid+'/agents/'+user.providerData[0].uid+'/fcmToken').set(token);
});
That code successfully gets the token and saves it to my firebase database. I then copy the token manually from my db and use it in my firebase notification console to send out a test notification. I know that the app is supposed to be running in the background. To get my app in the background I simply hit the home button. Then I send my test message. I don't get any errors in the firebase notification console and it says my token I supplied is all good. After a few seconds it says the notification status is completed. However in my app, nothing appears in my system tray, no notifications.
Does my app have to be in production mode or something? Anyone else get react-native-firebase to work with firebase cloud messaging on android?
I use the firebase console to send test messages

Is it possible to get push notification stats like count of deliveries and opens when sending messages through Firebase notification API?

We are about to switch to Firebase notifiaction API from Parse.com (that are retiring their service in jan 2017) to send push notification to our android and iOS Apps.
My question now is that I can't see any statistics about counts of successful deliveries and opens in the Firebase Console for a specific message ? The only thing we get when posting to https://fcm.googleapis.com/fcm/send is a message_id
{"message_id":123456789}
But I havn't seen any documentation on a api how to follow up a sent message with this message_id. And the Firebase console has only the these kind of stats for messages created in the Console Gui, not the one create through an api post.
These stats was availible in Parse.com. But it seems as Firebase Cloud Messaging is a bit more low level, and perhaps these stats doesn't come out the box, so they might have to be custom made in a logging app etc by sending back events from the apps when messages as received and opened etc. Or is there a standardized way that I've missed when reading the Firebase Notification api docs ?
When you send notifications from the Firebase Notifications console, you get statistics about how many people received and opened the messages. But there is no API (yet) for Firebase Notifications.
If you're using the Firebase Cloud Messaging API (https://fcm.googleapis.com/fcm/send), the message statistics don't show up in the Firebase Notifications console. You can (as AL. says) get delivery statistics in the Google Play Developer Console in that case.
firebase allows you to view sent/delivered/opened statuses by default from their website
http://console.firebase.google.com
at the notification section
but I am not sure about the parse.com implementations
also if you are a new comer to firebase let it collect user data for about 24 hours after successfully migrating to firebase
I found that in the first day the notifications weren't really reporting immediately
I think you're looking for the FCM Diagnostics and Statistics feature.
However, this is not visible in the Firebase Console, only in your Google Play Developer Console. And the feature only works if your app is at least in Alpha Testing.

Accessing FCM message logs

I'm having trouble figuring out whether or not FCM keeps logs of sent FCM push notifications, and if so, how to access them. I'm having intermittent issues with sending push notifications from an FCM server to an iphone app, and would love to be able to see at what stage the push is failing.
I found the below documentation that suggests that these logs should be kept somewhere:
https://support.google.com/googleplay/android-developer/answer/2663268?hl=en
("You can look up messages sent through Firebase Cloud Messaging with a registration token or message ID.")
However, I can't seem to figure out how to access them. Since my app is currently iOS only, I don't have an app in the Google Play Developer console, and my firebase console doesn't seem to contain any such logs. However, based on the possible message statuses in the documentation above (e.g. Accepted, sent to APNS), it seems like google / firebase should store message logs sent to iOS as well as to Android.
Thanks in advance for your help!

Resources