I am a novice to Android and Firebase. Is it possible to declare an array inside the the Parameter key of Firebase Remote Config?
I want to provide some promotions to some specific models/mobile devices. So if I could declare an array of models(i,e, Samsung J5, Xiaomi Note2 etc) I could easily enable promotions on those models. Please help me.
Firebase Remote Config is a cloud service that lets you change the behavior and appearance of your app without requiring users to download an app update. When using Remote Config, you create in-app default values that control the behavior and appearance of your app.
Hey Mobile Developers, today, I want to open an exciting topic from my perspective, and this is a realtime remote configuration for our mobile apps. In the following article I will explain to you: What does remote config mean and for what cases you can use it?
When using this feature, we recommend configuring default values for all parameters in the Firebase console. Use XML , PLIST , or JSON as the format value, depending on which file format you want to download.
The Remote Config has recently added the option to save a key-value list by saving it to a JSON format.
Sample usage:
1.Json stored in Remote Configs:
[ { "lesson": "1", "versionCode": 2 }, { "lesson": "2", "versionCode": 4 }, { "lesson": "3", "versionCode": 1 } ]
2.Kotlin model
data class Lesson(val lesson: Int, val versionCode: Int)
3.Retrieve json
String object = FirebaseRemoteConfig.getInstance().getString("test_json"); Gson gson = new GsonBuilder().create(); List<Lesson> lessons = gson.fromJson(object, new TypeToken<List<Lesson>>(){}.getType());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With