0
0
Android Kotlinmobile~20 mins

Remote Config in Android Kotlin - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Remote Config Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
ui_behavior
intermediate
2: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 here
AtextView.setText(welcomeMessage.toInt())
BtextView.text = welcomeMessage
CtextView.text = remoteConfig.getBoolean("welcome_message").toString()
DtextView.text = null
Attempts:
2 left
💡 Hint
Remember, Remote Config values are strings and TextView.text expects a string.
lifecycle
intermediate
2: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?
AFetch Remote Config values in a background thread after initial UI is shown
BFetch Remote Config values in onResume() and update UI after fetch completes
CFetch Remote Config values only when the user clicks a refresh button
DFetch Remote Config values in onCreate() and apply them immediately before showing UI
Attempts:
2 left
💡 Hint
Think about user experience and app responsiveness.
🔧 Debug
advanced
2: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?
AApp is running in debug mode
BRemote Config keys are misspelled in the app code
CRemote Config values are not set in the Firebase console
DDevice has no internet connection or poor network quality
Attempts:
2 left
💡 Hint
Timeout errors usually relate to network issues.
🧠 Conceptual
advanced
2:00remaining
What is the purpose of default Remote Config values?
Why should you set default values for Remote Config parameters in your app?
ATo ensure the app has safe fallback values when Remote Config fetch fails
BTo speed up Remote Config fetch calls
CTo prevent the app from compiling without Remote Config keys
DTo disable Remote Config features in production
Attempts:
2 left
💡 Hint
Think about what happens if the app cannot get values from the server.
navigation
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
Aif (showPromo == "true") { startActivity(Intent(this, PromoActivity::class.java)) }
Bif (showPromo.equals(true)) { startActivity(Intent(this, PromoActivity::class.java)) }
Cif (showPromo) { startActivity(Intent(this, PromoActivity::class.java)) }
Dif (showPromo != null) { startActivity(Intent(this, PromoActivity::class.java)) }
Attempts:
2 left
💡 Hint
Remember the type returned by getBoolean and how to check it.