how to send FCM (Firebase Cloud Message) to a particular version of your android app? for example:- my app's latest version is 2.0 and i only want to send notifications to devices having version 2.0.
Asked
Active
Viewed 3,162 times
2 Answers
8
If you're using the Notifications composer in the Firebase console to send your messages, you can target based on app version.
- Choose "User segment" under the "Target" step, select your app, and click "and" on the right side:
- In the new line that pops up, you can select "Version" and pick an app version:

Jeff
- 2,425
- 1
- 18
- 43
-
What am I doing wrong when "Version" is disabled in this dropdown? – M.D. May 16 '19 at 08:21
-
1The list of Version of app is empty, when I try it out. It just says "Search additional option", a horizontal line, and then "Enter a value above". I can create my own values, but it does not contain a list of versions. – Ted Apr 23 '20 at 07:03
-
Is there a way to send the notification to some specific Android Platform versions instead of app version? – Cyph3rCod3r Apr 05 '21 at 06:16
-
What is unclear is this: Android Apps versions have two known "versions", the Version String "3.5.0" and the VersionCode (numeric) 350 in this case. They are totally unrelated and FCM doesn't document at all what "version" value they are targeting with this dropdown. Very very poor design – CaptainCrunch Mar 02 '23 at 21:28
5
There is no built-in way to target a specific version of the app when sending messages through the FCM API. If you want to send messages to users of a specific version, you could set up a topic for each app version:
v1.0
v1.1
v2.0
...
So with that you can target users of a specific version.
If you want to send a message to all users that are not on the latest version, you can target them with a condition like this (if v2.0
is the latest version):
!('v2.0' in topics)

Frank van Puffelen
- 565,676
- 79
- 828
- 807
-
This is true for sends with the server APIs, but if sending through the console, it is possible to target app version: https://imgur.com/3sHV5Gg – Jeff Feb 11 '19 at 20:01
-
1Thanks for checking that Jeff, I forgot to do so. It actually would be a valid separate answer (and I'll clarify my answer to point out that this is about the API). – Frank van Puffelen Feb 11 '19 at 20:49
-