Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
132 views
in Technique[技术] by (71.8m points)

java - 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? for example:- my app's latest version is 2.0 and i only want to send notifications to devices having version 2.0.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...