Created
October 13, 2019 14:30
-
-
Save harshabhadra/7eeca1533f13421ed5095a7993034961 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
mWelcomeTextView = findViewById(R.id.textView); | |
versionNameTextView = findViewById(R.id.version_name); | |
// Get Remote Config instance. | |
mFirebaseRemoteConfig = FirebaseRemoteConfig.getInstance(); | |
//Create A remote config setting | |
FirebaseRemoteConfigSettings configSettings = new FirebaseRemoteConfigSettings.Builder() | |
.setMinimumFetchIntervalInSeconds(60) | |
.build(); | |
mFirebaseRemoteConfig.setConfigSettingsAsync(configSettings); | |
// Set default Remote Config parameter values. An app uses the in-app default values, and | |
// when you need to adjust those defaults, you set an updated value for only the values you | |
// want to change in the Firebase console. | |
mFirebaseRemoteConfig.setDefaultsAsync(R.xml.config_defaults); | |
version = getVersionName(this); | |
versionNameTextView.setText(version); | |
//Fetch Information from firebase | |
fetchWelcome(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment