Status of sent FCM messages [duplicate] - android

This question already has answers here:
Firebase notification records/log API
(2 answers)
Closed 4 years ago.
Is there any way how to check FCM message status without implementing XMPP server (since I want to look for iOS notifications as well)?
There was a way how to do it in Google Play Console, but I don't see any specific messages where could I check according to their multicast_id or message_id.
Source: https://support.google.com/googleplay/android-developer/answer/2663268?hl=en
I can see there only basic statistics and only of the messages that were sent from the Firebase console, not through API (which I need)
According to https://groups.google.com/forum/#!topic/firebase-talk/ArolxFrXclk, there should be some new service for this, but I can't find it anywhere.
Any news on this one?
It's impossible to find issues without any feedback to help our users to receive all notifications they chose to receive. Now I can only see that all messages were sent successfully from our backend.

Unfortunately, there still isn't any announced/released alternative for the FCM Diagnostics tool.
If you in need of more information, the suggested approach as of the moment is reach out to Firebase Support with the details of your concern.
For any updates regarding it, we should expect to see an update in this Google Documentation (see Changes to FCM Data section).

Related

Send a Notification to specific Mobile APP version [duplicate]

This question already has answers here:
send FCM to a particular version of your android app
(2 answers)
Closed 2 years ago.
I am using FCM Rest api https://fcm.googleapis.com/fcm/send to send background Notification using Topic. Now I have to send a notification to specific app version. for example version no 1.2.1 etc.
I have checked the FCM documentation but they didn't mention anything about this.
https://firebase.google.com/docs/cloud-messaging/js/topic-messaging
If you are able to send the notification using the Cloud Messaging dashboard in Firebase, then yes you can filter recipients by app versions that are listed as options. Otherwise, unless you already track which user is on which app version, no it's not possible.
I would love to know if I'm wrong, I hit this issue last week
You can keep track of the user app version in firebase, when you want to send a notification, you send it only to the users with the version that you desire. The way to implement this differs depending on the way that you are structuring your data, but the basic idea would be the same. Query the database to find the users with specific version and then send the notification to.
Another approach is to create a custom topic for every version and send the notification through it. This way the app subscribes to the topic which matches its version.
This first approach allows you to have a customized notification per user with the option to customize it further depending on the version they have. The second approach will allow you to send a custom notification per version without the need of keeping tack of the version they are in. However you will lose the ability to target a specific user with a custom notification based on their version and if you wanted to create multiple topics, then you will have to create all the topics for every version of the app, rather than a single topic for every version.

What is the alternative of Using FCM Server Key in Client Code? [duplicate]

This question already has answers here:
How to send one to one message using Firebase Messaging
(5 answers)
Closed 3 years ago.
I have build an android app to send the user to user notification using Firebase Cloud Messaging for that I have included FCM Server Key in client code.
Recently, I came to know about this that it is a security risk, that there could be malicious attack and the attacker can send the messages using that FCM server Key(if he comes to know about it). I am looking for the alternative for the same, can you guide me ?
I am using this tutorial Notification Tutorial
I agree that including the key in your client is a security risk!
One option you have is to send the notification via a cloud function. The cloud function would have the responsibility of all the interaction with FCM -- thus you keep the key secret. At the same time the function is able to do any necessary validation that the user is allowed to send the notification (e.g. authentication, rate limiting, formatting the message properly, etc).
Then have your app call the cloud function instead of trying to call FCM itself directly.

Android - Firebase Cloud Messaging Device to Device Push Notification Without Server [duplicate]

This question already has answers here:
How to send Device to device notification by using FCM without using XMPP or any other script.?
(3 answers)
Closed 5 years ago.
Is there a way to send push notification between 2 android devices without a server?
I found some tutorials but all of them was using the node.js for sending a notification. (Or I found that some samples that were using the firebase console for doing this)
Nope,
You need a "server" to do push notification. You can use a variety of services to do that, as you mentioned firebase is one of them. You may not need a full on server, but you need some kind of service to do that, you can't simply send notifications between devices straight away:
Some examples are:
AWS Serverless functions
Cloud functions in firebase
If you'd rather use one of these services, then you'll need to configure FCM in your app, you can check how to do that in the docs. And some nice sample codes here :)

FCM Topic Message doesn't appear on Console [duplicate]

This question already has answers here:
Topics on Firebase Cloud Messaging?
(2 answers)
Closed 4 years ago.
The FCM Topic creation takes way too long to appear in Console (14h to appear on Console). Does it mean that sending messages to that topic will also take the same time? I mean a client (Android app) subscribing to that topic has to wait for long to receive data (notification)?
FirebaseMessaging.getInstance().subscribeToTopic("MyTopic");
I have read this issue but unable to carve out my answer.
Thanks
Thanks to this SO Thread.
As soon as there is a single subscriber for the topic, it can be used immediately. But if you're going to use the Firebase console, it will take time for it to be visible in the options.

Notifications for Android

I am looking to implement notifications on my app. The way I would like for this to work is when I put something on my website, that is connected to my app, it gives a notification automatically even if the app is not running. I am just looking for the easiest way to accomplish this. By the way the info that is added from the website is put into a listview in the app(if that helps at all).
The server needs to do a several things in order to talk GCM:
http://developer.android.com/google/gcm/http.html
The client needs to do some registration and let your server know of the GCM registration ID:
http://developer.android.com/google/gcm/client.html
Those links will provide much more detail though
Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted.
Your app may poll your side every N minutes/hours/days or you can use Google Cloud Messaging service.
GCM: Here is a link describing the usage of GCM with a PHP web server:
http://www.programming-techniques.com/2014/01/google-cloud-messaging-gcm-in-android.html
So if you have any update on your site this can notify GCM which will notify all registered users (their devices with your app running).

Categories

Resources