• Creative Corner
  • Tips
  • Blog
29 March, 2017

Remote Config with Firebase

9series | 0Comment(s)

As an android app developer, it was very peculiar to do Client – Server communication before Firebase. Now, with the help of Firebase, all this became very comfortable for us.

Remote-Config-with-Firebase

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.

Using remote config user can modify android app without new production of android app development.

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.

Remote Config Integration:

Step 1 :

  • First it needs to create project on https://console.firebase.google.com/.
  • Click on create new project. After creating new project click on Add Firebase to your android app.
    image1
  • Add Package name and SHA-1 for Project with Following Command. You can generate debug SHA-1 Key
  • For Mac/Ubuntu:
    1
  • For Windows:
    2

    image 2

  • Download Config file
    From here, you can download google service.json file and add that google service.json file into your project at app level. Then press continue.

    image 3

  • Add Firebase SDK
    Open your project level build.gradle file and add this line under buildScript->Dependenciesclasspath 'com.google.gms:google-services:3.0.0'
    Open your app level build.gradle file and add this line at the bottom of file
    apply plugin: 'com.google.gms.google-services’
    Then press ‘ sync now ’ which is displayed in your IDE.

Step 2 :

  • First add the dependency of remote config in your app level build.gradle file.compile 'com.google.firebase:firebase-config:10.2.0'
  • Get remote config singleton object using below line in your MainActivity.java file.
    3

Step 3 :

  • Set default parameter valuesWe 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
    res->xml->remote_config_default.xml
  • Remote_config_default.xml
    4And simply add below line in your MainActivity.java to integrate default remote config value in you project.mFirebaseRemoteConfig.setDefaults(R.xml.remote_config_default);

Step 4 :

  • 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.
    5In this project user use to fetch remote config data in onClick of OK button.
    Here is the code for MainAcivity.java and activity_main.xml file
  • MainActivity.java :
    6
  • Activity_main.xml
    7

Step 5 :

  • Run your project into your device. In this device It looks like

    farebase android rpi.jpg

Step 6 :

  • 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 isMy_message : This is remote config testing
    My_message_color : #d6142e
  • Don’t forget to publish value (Click on publish in remote config firebase console) after adding or updating your remote config parameter.
    image5

Step 7 :

  • 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.

    farebase android

We’ve seen what 9series can do with Firebase Remote Config and how to execute it into our application to start modifying the look & feel and behavior of our application remotely.

Being a top Firebase android application development companies New York, we have experienced team with extensive knowledge in making mobile applications using Firebase platform.

 

Recent Posts

  • Easy Methods To Share Files From Host To Docker

  • 9series Inc - Clutch Year In Review 2021

  • A Quick Comparison of Docker vs. VM: Which DevOps Tool is Best?

  • Latest Update on Docker Paid Subscription for Big Enterprise

  • How to Become a Successful Travel Agent in New York

Categories

  • .Net MVC (3)
  • AI Solutions (2)
  • Amazon DynamoDB (1)
  • Android (24)
  • Android App Developers (2)
  • Android app development (7)
  • Angularjs Development (4)
  • Apple (25)
  • Artificial Intelligence (1)
  • Artificial Intelligence Solutions (3)
  • Beacon Technology (4)
  • Best Christmas Offer (2)
  • Blockchain Technology (2)
  • Cloud Service (2)
  • Clutch (1)
  • custom mobile app development services (4)
  • DevOps (1)
  • Digital Marketing (9)
  • Django (2)
  • Docker (11)
  • E-Learning Technology (3)
  • Ecommerce (1)
  • Events (4)
  • Flutter app development (1)
  • GDPR (1)
  • Google I/O (1)
  • Graphic Design (12)
  • html5 developers (2)
  • Human Resource (5)
  • Infographics (33)
  • iOS (21)
  • Laravel Development (2)
  • machine development companies in India (1)
  • Machine Learning (4)
  • Marketing (9)
  • mean stack development (1)
  • Microsoft (11)
  • Mobile App Design (3)
  • Mobile App Development (48)
  • Moodle Development (1)
  • next-generation technology (6)
  • Node.js (2)
  • Online Marketing (1)
  • Open Source (11)
  • open source Javascript framework (1)
  • Opening Ceremony (1)
  • Python (3)
  • Python Development (4)
  • Responsive Website Development (9)
  • SaaS App Development (2)
  • Search Engine Optimization (4)
  • Social Media Marketing (2)
  • Software Development Company (2)
  • Technology (44)
  • Testing (11)
  • Top Laravel Development (1)
  • Travel and Hospitality Technology Solution (4)
  • Typescript (1)
  • UI Design Company India (1)
  • UI Design Services (1)
  • UI/UX Design (10)
  • Uncategorized (11)
  • VueJS (3)
  • Web Application Development (8)
  • Website Design (2)
  • Website Development Company (7)

Archives

  • February 2022  (2)
  • January 2022  (1)
  • October 2021  (2)
  • September 2021  (3)
  • August 2021  (3)
  • July 2021  (1)
  • June 2021  (4)
  • May 2021  (1)
  • April 2021  (2)
  • March 2021  (1)
  • February 2021  (3)
  • January 2021  (1)
  • December 2020  (1)
  • November 2020  (2)
  • October 2020  (2)
  • September 2020  (1)
  • August 2020  (3)
  • July 2020  (2)
  • June 2020  (4)
  • May 2020  (3)
  • April 2020  (4)
  • March 2020  (4)
  • February 2020  (3)
  • January 2020  (2)
  • December 2019  (6)
  • November 2019  (1)
  • October 2019  (4)
  • September 2019  (4)
  • August 2019  (5)
  • July 2019  (3)
  • June 2019  (5)
  • May 2019  (2)
  • April 2019  (2)
  • February 2019  (5)
  • January 2019  (2)
  • December 2018  (2)
  • November 2018  (3)
  • October 2018  (6)
  • September 2018  (6)
  • August 2018  (7)
  • July 2018  (5)
  • June 2018  (5)
  • May 2018  (6)
  • April 2018  (8)
  • March 2018  (2)
  • November 2017  (1)
  • October 2017  (1)
  • September 2017  (3)
  • August 2017  (2)
  • July 2017  (3)
  • June 2017  (5)
  • May 2017  (4)
  • April 2017  (6)
  • March 2017  (8)
  • February 2017  (6)
  • January 2017  (4)
  • December 2016  (3)
  • November 2016  (4)
  • October 2016  (2)
  • September 2016  (3)
  • August 2016  (3)
  • July 2016  (2)
  • June 2016  (3)
  • May 2016  (3)
  • April 2016  (2)
  • March 2016  (3)
  • February 2016  (3)
  • January 2016  (4)
  • December 2015  (3)
  • November 2015  (4)
  • October 2015  (4)
  • September 2015  (5)
  • August 2015  (2)
  • July 2015  (2)
  • June 2015  (5)
  • May 2015  (3)
  • March 2015  (3)
  • October 2014  (4)
  • September 2014  (9)
  • August 2014  (4)
  • July 2014  (6)
  • June 2014  (1)
  • May 2014  (3)
  • April 2014  (2)
  • January 2014  (1)