{"id":6012,"date":"2017-03-29T06:09:01","date_gmt":"2017-03-29T06:09:01","guid":{"rendered":"https:\/\/9series-blog.staging9.com\/?p=6012"},"modified":"2026-03-03T10:44:47","modified_gmt":"2026-03-03T10:44:47","slug":"remote-config-with-firebase","status":"publish","type":"post","link":"https:\/\/www.9series.com\/blog\/remote-config-with-firebase\/","title":{"rendered":"Remote Config with Firebase"},"content":{"rendered":"<p><a href=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2017\/03\/Remote-Config-with-Firebase.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2176\" src=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2017\/03\/Remote-Config-with-Firebase.gif\" alt=\"Remote-Config-with-Firebase\" width=\"800\" height=\"500\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>As an <a href=\"https:\/\/9series.com\/blog\/firebase-revolutionary-mobile-platform-google\/\" target=\"_blank\">android app developer<\/a>, it was very peculiar to do Client &#8211; Server communication before Firebase. Now, with the help of Firebase, all this became very comfortable for us.<\/p>\n<p>Firebase provides many features like Analytics, Authentication, Real Time Database, Storage, Notification, Dynamic Links, Crash Reporting, Invites, Test lab, Remote config, App Indexing and Admob.<\/p>\n<p>Using remote config user can modify android app without new production of android app development.<\/p>\n<p>In Firebase, Remote Config defines parameters in our app and update their values in the cloud, allowing us to modify the appearance and behavior of our app without distributing an app update.<\/p>\n<p><strong><span>Remote Config Integration:<\/span><\/strong><\/p>\n<p style=\"margin-bottom: 0\"><strong><span>Step 1 :<\/span><\/strong><\/p>\n<ul>\n<li>First it needs to create project on https:\/\/console.firebase.google.com\/.<\/li>\n<li>Click on create new project. After creating new project click on Add Firebase to your android app.<br \/>\n<a style=\"margin-top: 15px;width: 100%;float: left\" href=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2017\/03\/image1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2177\" src=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2017\/03\/image1.jpg\" alt=\"image1\" width=\"679\" height=\"628\" \/><\/a><\/li>\n<li>Add Package name and SHA-1 for Project with Following Command. You can generate debug SHA-1 Key<\/li>\n<li><strong><span>For Mac\/Ubuntu:<\/span><\/strong><br \/>\n<a href=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2017\/03\/1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2253\" src=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2017\/03\/1.jpg\" alt=\"1\" width=\"562\" height=\"68\" \/><\/a><\/li>\n<li><strong><span>For Windows:<\/span><\/strong><br \/>\n<a href=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2017\/03\/2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2254\" src=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2017\/03\/2.jpg\" alt=\"2\" width=\"562\" height=\"79\" \/><\/a><a style=\"margin-top: 15px;width: 100%;float: left\" href=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2017\/03\/image-2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2190\" src=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2017\/03\/image-2.png\" alt=\"image 2\" width=\"690\" height=\"624\" \/><\/a><\/li>\n<li><strong><span>Download Config file<\/span><\/strong><br \/>\nFrom here, you can download google service.json file and add that google service.json file into your project at app level. Then press continue.<a style=\"margin-top: 15px;width: 100%;float: left\" href=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2017\/03\/image-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2191\" src=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2017\/03\/image-3.png\" alt=\"image 3\" width=\"689\" height=\"658\" \/><\/a><\/li>\n<li><strong><span>Add Firebase SDK<\/span><\/strong><br \/>\nOpen your project level build.gradle file and add this line under buildScript-&gt;Dependencies<code style=\"color: #878787;margin-top: 15px;float: left\">classpath 'com.google.gms:google-services:3.0.0'<\/code><br \/>\nOpen your app level build.gradle file and add this line at the bottom of file<br \/>\n<code style=\"color: #878787\">apply plugin: 'com.google.gms.google-services\u2019<\/code><br \/>\nThen press \u2018 sync now \u2019 which is displayed in your IDE.<\/li>\n<\/ul>\n<p style=\"margin-bottom: 0\"><strong><span>Step 2 :<\/span><\/strong><\/p>\n<ul>\n<li>First add the dependency of remote config in your app level build.gradle file.<code style=\"color: #878787\">compile 'com.google.firebase:firebase-config:10.2.0'<code> <\/code><\/code><\/li>\n<li>Get remote config singleton object using below line in your MainActivity.java file.<br \/>\n<a href=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2017\/03\/3.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2255\" src=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2017\/03\/3.jpg\" alt=\"3\" width=\"562\" height=\"112\" \/><\/a><\/li>\n<\/ul>\n<p style=\"margin-bottom: 0\"><strong><span>Step 3 :<\/span><\/strong><\/p>\n<ul>\n<li><strong><span>Set default parameter values<\/span><\/strong>We have to create one xml directory under res folder and create remote_config_default.xml file in xml directory in which remote config default parameter value is available. Directory flow should be<br \/>\nres-&gt;xml-&gt;remote_config_default.xml<\/li>\n<li><strong><span>Remote_config_default.xml<\/span><\/strong><br \/>\n<a href=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2017\/03\/4.jpg display:block;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2256\" src=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2017\/03\/4.jpg\" alt=\"4\" width=\"562\" height=\"209\" \/><\/a>And simply add below line in your MainActivity.java to integrate default remote config value in you project.<code style=\"color: #878787;margin-top: 15px;float: left\">mFirebaseRemoteConfig.setDefaults(R.xml.remote_config_default);<\/code><\/li>\n<\/ul>\n<p style=\"margin-bottom: 0\"><strong><span>Step 4 :<\/span><\/strong><\/p>\n<ul>\n<li>Creates fetch() request to fetch values from the Remote Config Server and callsactivateFetched() to make those values available to the app. Add below method in your MainActivity.java file.<br \/>\n<a href=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2017\/03\/5.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2257\" style=\"margin-top: 20px\" src=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2017\/03\/5.jpg\" alt=\"5\" width=\"562\" height=\"332\" \/><\/a>In this project user use to fetch remote config data in onClick of OK button.<br \/>\nHere is the code for MainAcivity.java and activity_main.xml file<\/li>\n<li><strong><span>MainActivity.java :<\/span><\/strong><br \/>\n<a href=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2017\/03\/6.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2258\" style=\"margin-bottom: 10px\" src=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2017\/03\/6.jpg\" alt=\"6\" width=\"562\" height=\"1523\" \/><\/a><\/li>\n<li><strong><span>Activity_main.xml<\/span><\/strong><br \/>\n<a href=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2017\/03\/7.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2259\" style=\"margin-bottom: 15px\" src=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2017\/03\/7.jpg\" alt=\"7\" width=\"562\" height=\"919\" \/><\/a><\/li>\n<\/ul>\n<p style=\"margin-bottom: 0\"><strong><span>Step 5 :<\/span><\/strong><\/p>\n<ul>\n<li>Run your project into your device. In this device It looks like<a style=\"margin-top: 15px;width: 100%;float: left\" href=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2017\/03\/farebase-android-rpi.jpg.jpg display:block;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2226\" src=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2017\/03\/farebase-android-rpi.jpg.jpg\" alt=\"farebase android rpi.jpg\" width=\"720\" height=\"366\" \/><\/a><\/li>\n<\/ul>\n<p style=\"margin-bottom: 0\"><strong><span>Step 6 :<\/span><\/strong><\/p>\n<ul>\n<li>Open your project into Firebase Console. Click on remote config and add parameter and its value. Here the user have used two parameters and its added value is<code style=\"color: #878787;margin-top: 15px;float: left\">My_message : This is remote config testing<br \/>\nMy_message_color : #d6142e<\/code><\/li>\n<li>Don\u2019t forget to publish value (Click on publish in remote config firebase console) after adding or updating your remote config parameter.<br \/>\n<a style=\"margin-top: 15px;width: 100%;float: left\" href=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2017\/03\/image5.jpg display:block;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2198\" src=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2017\/03\/image5.jpg\" alt=\"image5\" width=\"1283\" height=\"671\" \/><\/a><\/li>\n<\/ul>\n<p style=\"margin-bottom: 0\"><strong><span>Step 7 :<\/span><\/strong><\/p>\n<ul>\n<li>After adding this value, click on OK button for fetching values using remote config and then you will get the value of parameter which is defined in firebase remote config console. Check out this image below.<a style=\"margin-top: 15px;width: 100%;float: left\" href=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2017\/03\/farebase-android.jpg display:block;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2227\" src=\"https:\/\/9series-blog.staging9.com\/wp-content\/uploads\/2017\/03\/farebase-android.jpg\" alt=\"farebase android\" width=\"720\" height=\"356\" \/><\/a><\/li>\n<\/ul>\n<p>We\u2019ve seen what 9series can do with Firebase Remote Config and how to execute it into our application to start modifying the look &amp; feel and behavior of our application remotely.<\/p>\n<p>Being a <a href=\"https:\/\/www.9series.com\/services\/android-application-development.html\" target=\"_blank\">top Firebase android application development companies New York<\/a>, we have experienced team with extensive knowledge in making mobile applications using Firebase platform.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; As an android app developer, it was very peculiar to do Client &#8211; Server communication before Firebase. Now, with the help of Firebase, all this became very comfortable for&#8230;<\/p>\n","protected":false},"author":1,"featured_media":6013,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"dsgo_overlay_header":false,"dsgo_overlay_header_text_color":"","dsgo_overlay_skip_top_bar":false,"_designsetgo_exclude_llms":false,"footnotes":""},"categories":[1427],"tags":[2003,1776,1820,2004,2005,2006],"class_list":["post-6012","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-android","tag-android-app-developer","tag-android-app-development","tag-android-app-development-company-india","tag-firebase-platform","tag-firebase-remote-config-console","tag-top-firebase-android-application-development-companies-in-india"],"_links":{"self":[{"href":"https:\/\/www.9series.com\/blog\/wp-json\/wp\/v2\/posts\/6012","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.9series.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.9series.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.9series.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.9series.com\/blog\/wp-json\/wp\/v2\/comments?post=6012"}],"version-history":[{"count":1,"href":"https:\/\/www.9series.com\/blog\/wp-json\/wp\/v2\/posts\/6012\/revisions"}],"predecessor-version":[{"id":6027,"href":"https:\/\/www.9series.com\/blog\/wp-json\/wp\/v2\/posts\/6012\/revisions\/6027"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.9series.com\/blog\/wp-json\/wp\/v2\/media\/6013"}],"wp:attachment":[{"href":"https:\/\/www.9series.com\/blog\/wp-json\/wp\/v2\/media?parent=6012"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.9series.com\/blog\/wp-json\/wp\/v2\/categories?post=6012"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.9series.com\/blog\/wp-json\/wp\/v2\/tags?post=6012"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}