El release y su ciclo de vida
驴Qu茅 es un Release?
Ciclo de Vida de un Release y planificaci贸n
Tipos de Release y Estrategias de Ramificaci贸n
Quiz: El release y su ciclo de vida
Estrategias de Release en fase de desarrollo
Estrategias de Lanzamiento Controlado con Firebase
Dark Launches
Feature Toggles
A/B Testing
Quiz: Estrategias de Release en fase de desarrollo
Pruebas y Validaciones
Pruebas Exhaustivas
Validaciones y Seguridad
Optimizaci贸n y Compatibilidad
Quiz: Pruebas y Validaciones
Preparaci贸n del Release
Flavors y Builds: Configuraci贸n para Apps Android
Configuraci贸n en Google Play Console
Quiz: Preparaci贸n del Release
Ejecuci贸n del Release
Beta Testing
Phased Rollouts y Canary Releases en Google Play Console
Automatizaci贸n del Release
Quiz: Ejecuci贸n del Release
Post-Release
Estrategias de Mejora Continua
Monitoreo de Fallos
You don't have access to this class
Keep learning! Join and start boosting your career
Implementing controlled release strategies is critical to ensure a smooth user experience during mobile application updates. Using techniques such as dark launches and feature flags, developers can deploy new features in a secure and controlled manner, ensuring that all users receive updates simultaneously, regardless of their automatic update settings.
Dark launches are a strategy that allows you to introduce new features in a hidden way, activating them remotely when necessary. This technique is especially useful when we want to ensure that all users receive an update at the same time, even those who do not have automatic updates configured on their devices.
To implement this strategy, we will use Firebase Remote Config, a tool that allows us to remotely control the behavior of our application. Let's see step by step how to configure it:
Once the parameter is configured in Firebase, we need to implement the logic in our application to control this functionality. Following an MVVM architecture, we will create a dedicated ViewModel:
class MainViewModel(private val context: Context, private val application: Application) {
companion object { private val ACTIVE_KEY = "isActive" }
private val remoteConfig: FirebaseRemoteConfig = FirebaseRemoteConfig.getInstance()
private val _isActive = MutableStateFlow(true) val isActive: StateFlow<Boolean> get() = _isActive
private fun setupConfigRemote() { val configSettings = RemoteConfigSettings.Builder() .setMinimumFetchIntervalInSeconds(3600) .build()
remoteConfig.setConfigSettingsAsync(configSettings) remoteConfig.setDefaultsAsync(mapOf(ACTIVE_KEY to false)) }
private fun fetchAndActivate() { viewModelScope.launch { remoteConfig.fetchAndActivate() .addOnCompleteListener { task -> if (task.isSuccessful) { _isActive.value = remoteConfig.getBoolean(ACTIVE_KEY) } else { Toast.makeText(context, "Failed", Toast.LENGTH_SHORT).show() } } } } } } } } } } } } }}
In this code:
ACTIVE_KEY
constant that matches the parameter name in Firebase.FirebaseRemoteConfig
instance.StateFlow
to maintain the state of the functionality.The minimum refresh interval (3600 seconds) determines when the application will re-request updated values from Firebase.
To use this configuration in our UI, we need to connect the ViewModel to our view:
// In MainActivityval mainViewModel = MainViewModel(applicationContext, application)
// In the composable function@Composablefunction FoodTrackScreen(mainViewModel: MainViewModel) { val isActive by mainViewModel.isActive.collectAsState(initial = true)
Column { // Regular content of the app
// Show new functionality only if active if (isActive) { Card { // Content of the new functionality Text("New section enabled!") } } } } } } } } }}
With this implementation, we can remotely control the visibility of new functionality without the need to launch application updates. When we decide to enable the functionality for all users, we simply change the value in Firebase Remote Config.
Feature flags are a similar strategy to dark launches, but with a slightly different approach. While dark launches focus on launching updates in a controlled and simultaneous manner, feature flags are designed to turn on and off specific functionalities of our application as needed.
This technique allows us to:
The technical implementation is similar to dark launches, using Firebase Remote Config or other similar tools, but with a more granular focus on controlling individual features.
Mobile app developers can leverage these strategies to minimize risks during launches and ensure a consistent, high-quality user experience. Both dark launches and feature flags are essential tools in the arsenal of any development team looking to implement modern continuous delivery practices.
Have you ever implemented these strategies in your applications? Share your experience in the comments and tell us what other techniques you use to control your releases.
Contributions 0
Questions 0
Want to see more contributions, questions and answers from the community?