Version: stable
| CONSTANTS | |
|---|---|
| MSG_INITIALIZED | |
| MSG_ERROR | |
| MSG_DEFAULTS_SET | |
| MSG_FETCHED | |
| MSG_ACTIVATED | |
| MSG_SETTINGS_UPDATED | |
| MSG_CONFIG_UPDATED |
firebase.remoteconfig.initialize()
Initializes Firebase Remote Config. Generates MSG_INITIALIZED or MSG_ERROR
PARAMETERS
None
firebase.remoteconfig.set_callback(callback)
Sets a callback function for receiving events from the SDK. Call `firebase.remoteconfig.set_callback(nil)` to remove callback
PARAMETERS
callback |
function |
Callback function that is executed on any event in the SDK.
|
firebase.remoteconfig.fetch()
Fetches config data from the server. Generates MSG_FETCHED or MSG_ERROR
PARAMETERS
None
firebase.remoteconfig.activate()
Asynchronously activates the most recently fetched configs, so that the fetched key value pairs take effect. Generates MSG_ACTIVATED or MSG_ERROR
PARAMETERS
None
firebase.remoteconfig.fetch_and_activate()
Asynchronously fetches and then activates the fetched configs. Generates MSG_FETCHED and MSG_ACTIVATED or MSG_ERROR
PARAMETERS
None
firebase.remoteconfig.add_update_listener()
Starts listening for real-time config updates from Remote Config. Generates MSG_CONFIG_UPDATED or MSG_ERROR. Real-time updates automatically fetch new values but do not activate them; call `activate()` when the updated values should take effect.
PARAMETERS
None
firebase.remoteconfig.remove_update_listener()
Stops the active real-time config update listener.
PARAMETERS
None
firebase.remoteconfig.get_boolean(key)
Returns the value associated with a key, converted to a bool.
PARAMETERS
key |
string |
Key of the value to be retrieved |
firebase.remoteconfig.get_data(key)
Returns the value associated with a key, as a vector of raw byte-data.
PARAMETERS
key |
string |
Key of the value to be retrieved |
firebase.remoteconfig.get_number(key)
Returns the value associated with a key, converted to a double.
PARAMETERS
key |
string |
Key of the value to be retrieved |
firebase.remoteconfig.get_string(key)
Returns the value associated with a key, converted to a string.
PARAMETERS
key |
string |
Key of the value to be retrieved |
firebase.remoteconfig.get_keys()
Gets the set of all keys.
PARAMETERS
None
firebase.remoteconfig.set_defaults(defaults)
Sets the default values. Generates MSG_DEFAULTS_SET or MSG_ERROR
PARAMETERS
defaults |
table |
Key-value pairs representing the default values |
firebase.remoteconfig.set_minimum_fetch_interval(minimum_fetch_interval)
Sets the minimum fetch interval. Generates MSG_SETTINGS_UPDATED or MSG_ERROR
PARAMETERS
minimum_fetch_interval |
number |
The minimum interval in seconds between successive fetch calls |
firebase.remoteconfig.set_timeout(timeout)
Sets the timeout that specifies how long the client should wait for a connection to the Firebase Remote Config servers. Generates MSG_SETTINGS_UPDATED or MSG_ERROR
PARAMETERS
timeout |
number |
The timeout interval in seconds |
Event generated when real-time Remote Config has automatically fetched updated values. The message table contains `updated_keys`.