Working with Firebase Remote Config for Android

In this post we will be covering how to use Firebase Remote config for Android application. Follow this tutorial for basic setup to use Firebase related service in your project.


Use Case

Remote config is useful when you want to make some changes in your app but do want to user to download updated apk. The easy solution to this is creating remote config which you can update and it will get updated on devices.

For example you are using a free server to store your data. At some point of time it was closed, so your users will not able to access that data. Here you can make server url as remote config and when current server address changes you just have to push new url in remote config. All of your users will be now pointed to new server url.

 

[su_button url=”https://github.com/androidsrc/FirebaseRemoteConfig” target=”blank” style=”stroked” background=”#51d461" color=”#ffffff” size=”6" center=”yes” radius=”0" icon=”icon: arrow-circle-o-down”]Download Full Source Code[/su_b[/su_button]p> 

[su_yo[su_youtube url=”https://youtu.be/buSYAa1vqsw”]p> 

Lets start coding

In this sample application we will be using 2 parameters as remote config. These parameters will be added to server and then published. When your app starts we will fetch these parameters and this way latest data will be available to the user.

Follow this tutorial for setting up Firebase for android.

Next you have to add a dependency in app level build.gradle . Add highlighted dependency for using Remote config.

GuRu

Technology enthusiast. Loves to tinker with things. Always trying to create something wonderful using technology. Loves coding for Android, Raspberry pi, Arduino , Opencv and much more.

You may also like...

1 Response

  1. Abhishek EH says:

    Good article. Liked it.

Leave a Reply

Your email address will not be published. Required fields are marked *