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!
Related
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.
Is it possible to identify whether a particular push notification message was delivered to a particular token via Firebase Cloud Messaging? And, if so, is it possible to do so via an API call or by listening to some callback?
I know that I can look at aggregate statistics in the console and even segment those statistics through analytics tags, but cannot find a way to get more discrete information.
I also know that the API will synchronously respond if a token is invalid but the process by which Apple and Google invalidate tokens is a bit opaque (to me) and doesn't help if someone simply turned off push notifications for my app.
Thanks!
Jason
If someone turned off push notification – you can check it with code
Swift ios check if remote push notifications are enabled in ios9 and ios10
Android app - detect if app push notification is off
But user can be offline, or APNs / Firebase service – can get some problems and your notification will be drop. You can check delivery status with some code in iOS and Android applications.
If you need check, delivery status for some push you can make push notification extension (in iOS). For send status about delivered notification in your API. More info about push notification extension.
https://developer.apple.com/documentation/usernotifications/unnotificationserviceextension
It can be helpful
https://developer.apple.com/documentation/usernotifications
https://developer.apple.com/documentation/usernotifications/modifying_content_in_newly_delivered_notifications
https://firebase.google.com/docs/cloud-messaging/understand-delivery
https://firebase.google.com/docs/cloud-messaging/android/receive#handling_messages About handling messages in Android (you can send status delivered too)
I hope this answer will help with your problem.
UPD:
https://firebase.google.com/docs/cloud-messaging/understand-delivery
Received (available only on Android devices) — The data message or
notification message has been received by the app. This data is
available when the receiving Android device has FCM SDK 18.0.1 or
higher installed.
I have successfully implemented Push Notification in Xamarin.Android native App in VS2015 using Firebase Cloud Messaging from console. I tried to subscribe topic from Android App and would like to send push notification from console to all devices whoever subscribed to the topic. Unfortunately console did not show any topic...
App's logcat message is as
12-23 02:37:00.269 D/HomeNavigationActivity( 7745): Subscribed to remote notifications
12-23 02:37:00.331 D/FirebaseInstanceId( 7745): topic sync succeeded
When I check back in console it shows this project does not have any topic.
Does anybody have similar problem? Or any suggestion or idea would be highly appreciated....
Thank you
Note: Remember I was able to send single devices message using Firebase Cloud Messaging token.
It takes a few hours before new topics show up in the Firebase Console. You can already send messages to the topics through the API, but you'll have to wait for it to show up in the Firebase Notification console.
Source: Firebase topic sync succeeded but not shown in FCM Console
I use the HTTP Web API to send Downstream messages over GCM (recently switch to FCM) as well as Mozilla push.
GCM and FCM got a push authorization key and I assume that Google can clearly identify me as the message sender.
FCM URL (https://fcm.googleapis.com/fcm/send)
The Mozilla push service seems to be anonymous since it does not require any authorization key.
Mozilla (https://updates.push.services.mozilla.com/wpush/v1/)
My implementation does work and push messages are send to Chrome, Firefox and Android.
However, I cannot find any usage Statistics. I looked into the Firebase console as well the Google cloud console. All counters remains zero.
Can I or should I be able to see the usage statics for the Google push service ? Is their something similar Mozilla ?
Thanks for looking into this.
Regards
Stefan
There is currently only one way to find the statistics/statuses of the messages sent through GCM/FCM.
From the Cloud Messaging section in the Firebase Console:
It would seem that the Impressions and Opens are still only available for messages sent using the console. But Sends for sure now counts the messages sent using the FCM API.
Reference: https://firebase.googleblog.com/2018/08/in-app-messaging-crashlytics.html
I haven't tried Mozilla Push Service before so I'm unable to comment on that one.
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.