예제 #1
0
        public void Init(string defaultConfigResourceName = null, bool developerModeEnabled = false)
        {
            var settings = new AndroidFirebaseRemoteConfigSettings.Builder().SetDeveloperModeEnabled(developerModeEnabled).Build();

            _config.SetConfigSettings(settings);
            if (!string.IsNullOrWhiteSpace(defaultConfigResourceName))
            {
                var ctx   = CrossCurrentActivity.Current.AppContext;
                var resId = ctx.Resources.GetIdentifier(defaultConfigResourceName, "xml", ctx.PackageName);
                _config.SetDefaults(resId);
            }
        }
예제 #2
0
        /// <summary>
        /// Init with default values
        /// </summary>
        /// <param name="defaultConfigResourceName"></param>
        public void Init(string defaultConfigResourceName = null)
        {
            var settings = new AndroidFirebaseRemoteConfigSettings.Builder().Build();

            _config.SetConfigSettingsAsync(settings);
            if (!string.IsNullOrWhiteSpace(defaultConfigResourceName))
            {
                var ctx = CrossCurrentActivity.Current.AppContext;
                if (ctx.Resources != null)
                {
                    var resId = ctx.Resources.GetIdentifier(defaultConfigResourceName, "xml", ctx.PackageName);
                    _config.SetDefaultsAsync(resId);
                }
            }
        }