Challenge - 5 Problems
Remote Config Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ ui_behavior
intermediate2:00remaining
How does Remote Config update UI values?
You have a TextView showing a welcome message. After fetching Remote Config values, which code snippet correctly updates the TextView with the new value?
Android Kotlin
val welcomeMessage = remoteConfig.getString("welcome_message")
// Update TextView hereAttempts:
2 left
💡 Hint
Remember, Remote Config values are strings and TextView.text expects a string.
✗ Incorrect
Remote Config values are retrieved as strings. To update a TextView, assign the string value directly to textView.text.
❓ lifecycle
intermediate2:00remaining
When should you fetch Remote Config values?
In an Android app, when is the best time to fetch Remote Config values to ensure the app shows the latest configuration without delaying startup?
Attempts:
2 left
💡 Hint
Think about user experience and app responsiveness.
✗ Incorrect
Fetching Remote Config in the background after UI shows avoids delaying app startup and allows updating UI when new values arrive.
🔧 Debug
advanced2:00remaining
Why does Remote Config fetch fail with a timeout?
You notice Remote Config fetch calls fail with a timeout error on some devices. What is the most likely cause?
Attempts:
2 left
💡 Hint
Timeout errors usually relate to network issues.
✗ Incorrect
Timeout errors happen when the device cannot reach the Remote Config server due to no or poor internet connection.
🧠 Conceptual
advanced2:00remaining
What is the purpose of default Remote Config values?
Why should you set default values for Remote Config parameters in your app?
Attempts:
2 left
💡 Hint
Think about what happens if the app cannot get values from the server.
✗ Incorrect
Default values provide fallback settings so the app behaves predictably even if fetching Remote Config fails.
expert
2:00remaining
How to trigger navigation change based on Remote Config?
You want to navigate to a special promotion screen only if Remote Config parameter "show_promo" is true. Which code snippet correctly performs this navigation in an Android app using Kotlin?
Android Kotlin
val showPromo = remoteConfig.getBoolean("show_promo") // Navigate if showPromo is true
Attempts:
2 left
💡 Hint
Remember the type returned by getBoolean and how to check it.
✗ Incorrect
getBoolean returns a Boolean, so a simple if (showPromo) check is correct. Comparing to string or using equals is incorrect.