/** * Fetch discount from server. */ private async System.Threading.Tasks.Task FetchDiscount() { mPriceTextView.SetText(LOADING_PHRASE_CONFIG_KEY, null); long cacheExpiration = 3600; // 1 hour in seconds. try { await mFirebaseRemoteConfig.FetchAsync(cacheExpiration); Toast.MakeText(this, "Fetch Succeeded", ToastLength.Long).Show(); // Once the config is successfully fetched it must be activated before newly fetched // values are returned. mFirebaseRemoteConfig.Activate().Wait(); } catch { Toast.MakeText(this, "Fetch Failed", ToastLength.Long).Show(); } DisplayPrice(); }