Remote Config is a feature of the Firebase suite that allows users to customize how the app renders for each user. With this feature, one can change the look and feel, roll out features gradually, run A/B tests, deliver customized content to certain users, or make other updates without deploying a new version of the app to the Appstore or Play Store. Before we further discuss the Remote Config feature, let us take a look at what the Firebase suite is. The Firebase is a comprehensive app development platform by Google that helps us to build, improve, and grow our apps. Following are the different products offered by Firebase.
The blogpost attempts to explore the Remote Config feature while explaining how it facilitates immediate updates, temporary changes, or testing new features amongst users without publishing a new version of the app. The below-mentioned information has been compiled based on our experience of implementing it for a leading media house.
Remote Config: An Overview
With Remote Config, we can publish updates to our users immediately. Whether we wish to dynamically change the color scheme for a screen, the layout for a particular section in our app, show promotional/seasonal options or change the behavior of our apps. It is a cloud service with which we can change the appearance and behavior of our app from the Firebase console and then track performance in Google Analytics for Firebase. In addition to it, without distributing an app update, we can customize by audience segment, release new content, and split tests to validate improvements.
Now, let us move on to discuss how to navigate through the Remote Config feature. Remote Config works by primarily using in-app defined values that control the behavior and appearance of our app. Later, we will use the Firebase console to update the values and to use the Remote Config REST API to override the in-app default values for all of our app users or segments of our user base. In simpler terms, on the server-side, we will maintain key-value pairs of the specified values, and from the client-side, as we affect Remote Config, we will fetch those values and use them for app updates or to vary the app appearance or behavior. The client library in Remote Config handles tasks like fetching values and caching them. At the same time, it gives us control over situations when new values are activated or fetched so that they affect our app’s user experience. By controlling the timing of any changes, we can safeguard our app experience. A single access point for parameter values is provided by the Remote Config client library “get” methods. In our app, server-side values are fetched using the similar logic that it uses to get in-app default values, thus capabilities of Remote Config can be added to apps with minimal code.
To override in-app default values, we can use the Firebase console or the Remote Config backend APIs.
Parameters, Rules and Conditions of Remote Config
Parameters are key-value pairs that are defined within Remote Config. These parameters are then used to define the configuration values that are to be used within our app, such as the color of a component, the text to be displayed in a view, and the like. We can also provide default values within our application to cover cases when these parameters may not be set on or available from the server.
To target a group of app instances, we use a condition. The one or more rules that constitute conditions must all evaluate as true for the condition to evaluate as true for a given app instance. If the value for a rule is undefined (for example, when no value is available), that rule will evaluate as false.
Let us consider an example, a parameter that defines an app’s splash page could display different images based on OS type using the simple rule if device_os = Android:
If an app instance satisfies the above condition, it will fetch only the condition value for Android splash page. This could be better explained with the image shown below.
Now, let us consider a situation where we have multiple conditions. In such a case, how will the app determine which value to use? In this case, Remote Config uses a collection of rules to specify which value is to be retrieved from the Remote Config Server. When we are requesting for multiple conditional values, if the given application instance satisfies only a single condition, then the value for that condition is returned. On the opposite hand, if multiple conditions are satisfied, then the one with the very best dominance (basically, the one at the highest of the list within the Remote Config Console) is returned. However, if there are no conditional values that are satisfied, then the default value defined on the server is returned.
Consider the following example wherein the app version code has multiple conditions. As per the above rule, the app instance which satisfies the condition Android New CMS 001 will fetch the value 8.82 for the app_version_code parameter on the app side. In the same example, an android with condition Android new cms 001 not satisfied will use the condition android value 227 for app_version_code parameter. Take a look at the image given below for a better understanding.
Benefits of Remote Config
The Remote Config feature offers several benefits that explain why one must implement it. The benefits are as follows:
- Make Changes without Updating your App: With Remote Config, we can change a particular text or disable/enable a particular feature without having to go for an update. We can connect the maximum elements of our app with each key that we create in Remote Config, and thus we can manage all the elements dynamically. Remote Config can download the updated values the next time a user starts our app, without having to publish a new version of your app.
- Run A/B Tests and Gradual Rollouts: Since Remote Config allows us to deliver different values to random users, we can take advantage of this to run A/B tests. We can run A/B tests by supplying different values to different groups.
- Delivering Customized Content to Specific Users: By making use of conditions available in the Remote Config, we can easily categorize and deliver different content to different people who use the same app. For example, we can even enable a particular feature to a certain group of users, or we can disable it for others. We can also keep different data sets separately for Android and iOS devices. For this, we can also make use of Firebase analytics for getting more sophisticated targeting of users.
- Hiding Features in the App: If you want to launch a new feature on your app but aren’t sure if users are going to accept it, then you can hide it behind a flag in your code. Then, we can manage this feature through Remote Config. We can also gradually roll out the features instead of applying them to all the users.
- Accelerated Updation: If we change something in Remote Config, the change will be available for the app within seconds. From the next fetch itself, the user gets the updated data.
Remote Config is used by developers in different ways with respect to their individual requirements. As mentioned previously, by allowing developers to change the look and feel of their app remotely and by allowing them to run experiments, the Remote Config feature provides a brand new experience. The feature that is available as part of the Firebase platform is available for free, and its implementation would enable developers to cater and stay aware of the user’s requirements.
Febin M Fathah, Senior Software Engineer, RapidValue
Anu KP, Software Engineer, RapidValue