14

I'm using Firebase Remote Config, and I'm trying to wrap my head around the App Version conditions.

https://firebase.google.com/docs/remote-config/parameters#rule_types says I must do String matching on it.

But I really need a way to say parameter_x will have different values on different version ranges.

Is there any way to do this, or am I stuck coming up with a ridiculous regular expression?

Scott Kennedy
  • 1,346
  • 12
  • 23
  • 10
    I'm not sure why they went with `versionName` and not `versionCode`. It would be so much simpler to compare. If it's of any help, you can use comma separated values, and just list the versions you want to be included. – lenooh Jun 15 '17 at 09:00
  • 2
    The problem with that is you have to make sure you update it with every release. I want it to take a certain value on all versions greater than X, without having to update that condition all the time. But yes, `versionCode` would be great. – Scott Kennedy Jun 21 '17 at 21:55

1 Answers1

4

the comparison operators for app version are limited (because of strings, eg 0.0.1-alpha5):

for string values: contains, does not contain, exactly matches, regular expression

while an (int) versionCode could be defined & compared as a user property:

for numeric values: =, , >, , <,

appending the build flavor to the versionName might be the most simple.

Martin Zeitler
  • 1
  • 19
  • 155
  • 216