private void enableDeveloperModeInDebugModel(FirebaseRemoteConfig remoteConfig)
        {
            var settings = new FirebaseRemoteConfigSettings
                           .Builder()
                           .SetDeveloperModeEnabled(true)
                           .Build();

            remoteConfig.SetConfigSettings(settings);
        }
        public void DeveloperMode(bool enable)
        {
            IsDeveloperModeEnable = enable;
            FirebaseRemoteConfigSettings configSettings = new FirebaseRemoteConfigSettings.Builder()
                                                          .SetDeveloperModeEnabled(enable)
                                                          .Build();

            _firebaseRemote.SetConfigSettings(configSettings);
        }
Beispiel #3
0
        private void InitRemoteConfig()
        {
            firebaseRemoteConfig = FirebaseRemoteConfig.Instance;
            FirebaseRemoteConfigSettings configSettings = new FirebaseRemoteConfigSettings.Builder()
                                                          .SetDeveloperModeEnabled(true)
                                                          .Build();

            firebaseRemoteConfig.SetConfigSettings(configSettings);
            firebaseRemoteConfig.SetDefaults(Resource.Xml.remote_config_defaults);
        }
Beispiel #4
0
        public void Init()
        {
            _firebaseRemoteConfig = FirebaseRemoteConfig.Instance;
#if DEBUG
            var configSettings = new FirebaseRemoteConfigSettings.Builder().SetDeveloperModeEnabled(true).Build();
            _firebaseRemoteConfig.SetConfigSettings(configSettings);
            long cacheExpiration = 0;
#else
            var configSettings = new FirebaseRemoteConfigSettings.Builder().SetDeveloperModeEnabled(false).Build();
            _firebaseRemoteConfig.SetConfigSettings(configSettings);
            long cacheExpiration = 3600; // 1 hour in seconds.
#endif

            _firebaseRemoteConfig.SetDefaults(Resource.Xml.firebase_default_settings);
            Task.Factory.StartNew(async() =>
            {
                await _firebaseRemoteConfig.FetchAsync(cacheExpiration);
                _firebaseRemoteConfig.ActivateFetched();
            });
        }
        public FirebaseABTestingImplementation()
        {
            CacheTimeout          = 0;
            IsDeveloperModeEnable = true;
            _firebaseRemote       = FirebaseRemoteConfig.Instance;
            FirebaseRemoteConfigSettings configSettings = new FirebaseRemoteConfigSettings.Builder()
                                                          .SetDeveloperModeEnabled(true)
                                                          .Build();

            _firebaseRemote.SetConfigSettings(configSettings);
        }
        protected override async void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.activity_main);

            mPriceTextView = (TextView)FindViewById(Resource.Id.priceView);

            Button fetchButton = (Button)FindViewById(Resource.Id.fetchButton);

            fetchButton.Click += async delegate
            {
                await FetchDiscount();
            };


            // Get Remote Config instance.
            // [START get_remote_config_instance]
            mFirebaseRemoteConfig = FirebaseRemoteConfig.Instance;
            // [END get_remote_config_instance]

            // Create Remote Config Setting to enable developer mode.
            // Fetching configs from the server is normally limited to 5 requests per hour.
            // Enabling developer mode allows many more requests to be made per hour, so developers
            // can test different config values during development.
            // [START enable_dev_mode]
            FirebaseRemoteConfigSettings configSettings = new FirebaseRemoteConfigSettings.Builder().SetDeveloperModeEnabled(BuildConfig.DEBUG).Build();

            mFirebaseRemoteConfig.SetConfigSettings(configSettings);
            // [END enable_dev_mode]

            // Set default Remote Config values. In general you should have in app defaults for all
            // values that you may configure using Remote Config later on. The idea is that you
            // use the in app defaults and when you need to adjust those defaults, you set an updated
            // value in the App Manager console. Then the next time you application fetches from the
            // server, the updated value will be used. You can set defaults via an xml file like done
            // here or you can set defaults inline by using one of the other setDefaults methods.S
            // [START set_default_values]
            mFirebaseRemoteConfig.SetDefaults(Resource.Xml.remote_config_defaults);
            // [END set_default_values]

            // Fetch discount config.
            await FetchDiscount();
        }