Firebase Remote Config for app updates in Android

marouene khadhraoui
2 min readFeb 21, 2022

Firebase is one of the necessary tools in Android developement due to its multiple features and the simplicity of their integration . In this Article we will look into the Remote Configuration functionality and use it to check app updates .

App Updates

New versions of mobile apps are rolled out all the time . Users must be redirected to update their version of the app when a new one is available in the store . We need to make remote changes to all the versions for all users and redirect them to update their app and block the use of it in certain cases . This is where Firebase Remote config comes in place . We are going to use this Firebase API to display a dialogue when a new version hits the play store .

Update dialog

Lets start with setting up Firebase Remote Config :

Now we must add the required parameters in the Firebase Console . In your Firebase project console select the Remote Config option in the menu on the left and add you parameters . You can add up to 1000 parameters with String , Boolean , Json and Integer types .

Add parameters in the Firebase Console

We need to set in-app default parameters in our Firebase Remote Backend . We need to define a map of keys and values in an xml file .

Now in the class Application , we must configure and initialise the Firebase instance . The best way to do it is in the Application class to ensure intilisation everytime the app is launched .

Now that everything is in place . We need to check for the app version in the installed app .

We need to compare the installed app version and the version fetched from the Firebase Remote backend and display a non dismissable dialog .

Thats it ! The dialog will display if the installed version is different from the version in the Friebase Remote Config .

Thank you for Reading !

All comments and shares are appreciated !

--

--