remoteconfig

Version: stable

FUNCTION
remoteconfig.init()
remoteconfig.fetch()
remoteconfig.activate()
remoteconfig.fetch_and_activate()
remoteconfig.get_boolean()
remoteconfig.get_data()
remoteconfig.get_number()
remoteconfig.get_string()
remoteconfig.get_keys()
remoteconfig.set_defaults()
remoteconfig.set_minimum_fetch_interval()
CONSTANT
remoteconfig.CONFIG_INITIALIZED
remoteconfig.CONFIG_ERROR
remoteconfig.CONFIG_DEFAULTS_SET
remoteconfig.CONFIG_FETCHED
remoteconfig.CONFIG_ACTIVATED
remoteconfig.SETTINGS_UPDATED
remoteconfig.SETTINGS_ERROR

Functions

remoteconfig.init()

remoteconfig.init(callback)

Initialise Firebase Remote Config. Generates CONFIG_INITIALIZE or CONFIG_ERROR

PARAMETERS

callback Function to call when a remote config event has happened

remoteconfig.fetch()

remoteconfig.fetch()

Fetches config data from the server. (Official docs https://firebase.google.com/docs/reference/cpp/class/firebase/remote-config/remote-config#fetch). Generates CONFIG_FETCHED or CONFIG_ERROR

PARAMETERS

None


remoteconfig.activate()

remoteconfig.activate()

Asynchronously activates the most recently fetched configs, so that the fetched key value pairs take effect. (Official docs https://firebase.google.com/docs/reference/cpp/class/firebase/remote-config/remote-config#activate). Generates CONFIG_ACTIVATED or CONFIG_ERROR

PARAMETERS

None


remoteconfig.fetch_and_activate()

remoteconfig.fetch_and_activate()

Asynchronously fetches and then activates the fetched configs. (Official docs https://firebase.google.com/docs/reference/cpp/class/firebase/remote-config/remote-config#fetchandactivate). Generates CONFIG_FETCHED and CONFIG_ACTIVATED or CONFIG_ERROR

PARAMETERS

None


remoteconfig.get_boolean()

remoteconfig.get_boolean(key)

Returns the value associated with a key, converted to a bool. (Official docs https://firebase.google.com/docs/reference/cpp/class/firebase/remote-config/remote-config#getboolean)

PARAMETERS

key Key of the value to be retrieved

remoteconfig.get_data()

remoteconfig.get_data(key)

Returns the value associated with a key, as a vector of raw byte-data. (Official docs https://firebase.google.com/docs/reference/cpp/class/firebase/remote-config/remote-config#getdata)

PARAMETERS

key Key of the value to be retrieved

remoteconfig.get_number()

remoteconfig.get_number(key)

Returns the value associated with a key, converted to a double. (Official docs https://firebase.google.com/docs/reference/cpp/class/firebase/remote-config/remote-config#getdouble)

PARAMETERS

key Key of the value to be retrieved

remoteconfig.get_string()

remoteconfig.get_string(key)

Returns the value associated with a key, converted to a string. (Official docs https://firebase.google.com/docs/reference/cpp/class/firebase/remote-config/remote-config#getstring)

PARAMETERS

key Key of the value to be retrieved

remoteconfig.get_keys()

remoteconfig.get_keys()

Gets the set of all keys. (Official docs https://firebase.google.com/docs/reference/cpp/class/firebase/remote-config/remote-config#getkeys)

PARAMETERS

None


remoteconfig.set_defaults()

remoteconfig.set_defaults(defaults)

Sets the default values. (Official docs https://firebase.google.com/docs/reference/cpp/class/firebase/remote-config/remote-config#setdefaults)

PARAMETERS

defaults Key-value pairs representing the default values. Generates CONFIG_DEFAULTS_SET or CONFIG_ERROR

remoteconfig.set_minimum_fetch_interval()

remoteconfig.set_minimum_fetch_interval(minimum_fetch_interval)

Sets the minimum fetch interval. (Official docs https://firebase.google.com/docs/reference/cpp/struct/firebase/remote-config/config-settings)

PARAMETERS

minimum_fetch_interval The minimum interval in milliseconds between successive fetch calls. Generates SETTINGS_UPDATED or SETTINGS_ERROR

Constants

remoteconfig.CONFIG_INITIALIZED

Event generated when remote config has been initialized and is ready for use


remoteconfig.CONFIG_ERROR

Event generated when an error occurred.


remoteconfig.CONFIG_DEFAULTS_SET

Event generated when the default values have been set


remoteconfig.CONFIG_FETCHED

Event generated when the remote config has been fetched


remoteconfig.CONFIG_ACTIVATED

Event generated when the remote config has been activated


remoteconfig.SETTINGS_UPDATED

Event generated when remote config settings have been updated


remoteconfig.SETTINGS_ERROR

Event generated when an error occurred during updating settings