Once you’ve opened the Firebase console, you’ll see two text fields: ![]() Note: If this default value is not defined then no value is returned when requested. To set the default values for the remote config parameters MFirebaseRemoteConfig = FirebaseRemoteConfig. Instance to access the remote config parametersįirebaseRemoteConfig mFirebaseRemoteConfig put( FB_RC_KEY_LATEST_VERSION, ""+ versionCode) put( FB_RC_KEY_FORCE_UPDATE_VERSION, ""+ versionCode) ĭefaultMap. put( FB_RC_KEY_DESCRIPTION, "A new version of the application is available please click below to update the latest version.") ĭefaultMap. put( FB_RC_KEY_TITLE, "Update Available") ĭefaultMap. Hashmap which contains the default values for all the parameter defined in the remote config serverįinal HashMap defaultMap = new HashMap() ĭefaultMap. To get the version code from the auto generated fileįinal int versionCode = BuildConfig. Value - used to represent the value of the defined parameter.Ĭreate and initialise a default HashMap, values will be served from this HashMap until a fetch request is completed Key - used to define the identify for the parameter These parameters will be used in your client app. In Remote Config you can define key-value pairs which are known as parameters. Once done, you can then access the FirebaseRemoteConfig instance throughout your application where required. The option “Set Up Remote Config” from the Assistant window which can be open by Tools > Firebase and the needed library will be automatically added. Using Firebase Assistant, you can easily complete this setup by selecting
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |