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.
Related
I am developing a mobile application which requires a push notification to notify the user when a certain condition is met. I am new to this and I discovered multiple ways to implement a push notification.
However, I am unsure of which one is best to be implemented. I am new to mobile app development so I am unsure of how to differ both of them.
From my understanding, androidx NotificationCompat is easier to be used but my SV suggests me to use Firebase Cloud Messaging instead.
Short answer:
NotificationCompat is the helper class for the developer to access in android.app.Notification.
Firebase Cloud Message(FCM) is a cross-platform messaging solution that lets you reliably send messages at no cost.
I can't help you make a final decision, I just list the positive and negative options of them, hope can help you.
For FCM
To notify the end-user of the new message which you want them to know(eg. bouns/upgrade, even though the cycling message at 18:30 every day, etc).
Help the developer to track the lifecycle of the notification(how many were opened? how many were canceled, etc..)
Help the developer to Customize the Notification Styles, and can also preview them in the console of the FCM.
Can also implement your own background and send your customized message to the background center of the FCM with XMPP
Can also send message to the part of the user
With some topic(eg: send message to the user who enters some page or use some function)
With some age(eg: send message to the user who ages between 29 and 25 years old)
For NotificationCompact
use for local, hard control from your backend.
others...
Can I use Onesignal to send a notification of order changes to an Android device then if the user already opened the application on order's page/view the notification will be not shown but the order status on that page will be changed?
If yes, can I know the reference of documentation/tutor? If no, what are alternative ways to do it?
I have a project using Onesignal to send the notifications to the android devices. Currently just Simple notif, but my boss asked me to make the mobile app can auto change status order without user action. I'm a backend engineer, not an android dev so I don't know what really works of Onesignal in android. I just know Onesignal can be used to send the notification but what about data process after notification sent?
This is what I understood: Your app has some kind of market or something from which people can order stuff. So, you want to know if OneSignal can send automated notifications as the order status changes?
If I have got it correct, my best guess will be, no. OneSignal can only manually send out notifications. The closest one can get with OneSignal to automations is scheduling notifications to be sent later. To achieve your purpose, your Android devs will probabaly have to write some code on their own and integrate it some way with the order status and all. Or else, your boss will have to appoint a few people who can track the order of the people and manually send out notifications to them using OneSignal (but, identifying the correct device might not be so easy).
That's my guess. But, OneSignal's support team is pretty nice. They might take a few days to answer, but, it's worth asking them if they can help your developers integrate the order status and OneSignal's notifications in some way.
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).
I am new with FCM and I am still discovering its possibilities.
I wonder if it is the right tools to do what I want:
I would like to send a notification to all my users, to inform them about new informations for example.
The difficulty is that I want to target all the users of different apps (like 10 apps), and some of them may have more than one of my app installed.
So I do not want a user to have the same notification displayed multiple times (if he installed more than one of my app).
Is it something possible with Firebase?
Thank you
Yes you can! To achieve this, i recomand you using Google Cloud Messaging not FCM. which it's an earlier version. Here is a tutorial on how you can migrate from FCM to GCM.
To achieve this, all your 10 apps must use Firebase and all your users must be Firebase registered users. To send a notification to all devices, would mean then to select all the registration ids from that database, add them in an array and pass them further to GCM.
Note also, that strating with GCM 3.0 it's now possible to send a notification to all devices thanks to topics support. The app must suscribe to one or more topics and the server can send notifications to that topic without specifying individual devices. You can see here Topic Messaging.
Unfortunately, there is no way in which, with a single line of code, to send a notification to all of your users from all your apps. You can only send a notification to all your users that belong only to a single app. If you want that all of yours to get the same message, then you need to consider sending that particular message again, to all users that belong to each app. In this case, if a users is using more then one of your apps, will receieve that message for each app separately.
For example the client wants to use Urban Airship to send a push notification to users with app version 1.0 only, but not 1.1 or 1.2. They might want to remind users of an old version to update their app, without bothering users who have already updated.
Is it possible to implement? If so, how? As far as I know, there is no way to control that and all registered users will receive the broadcast message. But I just wanted to double check.
Thank you
You must not make this, google will ban your app from the market as they do not allow anymore push notifications sent to the users for advertising another or your own app. So even if there is no way to "select" people exept if you run your own server updated by the app (you cant do it throught google platform ) dont bother to make a server for that as you will be incompatible with Google's App policy.