[英]send FCM to a particular version of your android app
how to send FCM (Firebase Cloud Message) to a particular version of your android app?如何将 FCM(Firebase 云消息)发送到您的 android 应用程序的特定版本? for example:- my app's latest version is 2.0 and i only want to send notifications to devices having version 2.0.例如:- 我的应用程序的最新版本是 2.0,我只想向具有 2.0 版本的设备发送通知。
There is no built-in way to target a specific version of the app when sending messages through the FCM API.通过 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
是最新版本):
!('v2.0' in topics)
If you're using the Notifications composer in the Firebase console to send your messages, you can target based on app version.如果您使用 Firebase 控制台中的通知编辑器发送消息,则可以根据应用版本进行定位。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.