- firebase.
- remoteConfig.
- RemoteConfig
The Firebase Remote Config service interface.
Do not call this constructor directly. Instead, usefirebase.remoteConfig().
Index
Properties
app
Theapp associated with thePerformance serviceinstance.
- example
var app = analytics.app;
defaultConfig
Object containing default values for configs.
Type declaration
[key:string]:string |number |boolean
fetchTimeMillis
The Unix timestamp in milliseconds of the lastsuccessful fetch, or negative one iftheRemoteConfig instance either hasn't fetched or initializationis incomplete.
lastFetchStatus
The status of the last fetchattempt.
settings
Defines configuration for the Remote Config SDK.
Methods
activate
- activate():Promise<boolean>
Makes the last fetched config available to the getters.Returns a promise which resolves to true if the current call activated the fetched configs.If the fetched configs were already activated, the promise will resolve to false.
ReturnsPromise<boolean>
ensureInitialized
- ensure
Initialized():Promise<void> Ensures the last activated config are available to the getters.
ReturnsPromise<void>
fetch
- fetch():Promise<void>
Fetches and caches configuration from the Remote Config service.
ReturnsPromise<void>
fetchAndActivate
- fetch
And Activate():Promise<boolean> Performs fetch and activate operations, as a convenience.Returns a promise which resolves to true if the current call activated the fetched configs.If the fetched configs were already activated, the promise will resolve to false.
ReturnsPromise<boolean>
getAll
- get
All():{} Gets all config.
Returns{}
[key:string]:Value
getBoolean
- get
Boolean(key: string):boolean Gets the value for the given key as a boolean.
Convenience method for calling
remoteConfig.getValue(key).asBoolean().Parameters
key:string
Returnsboolean
getNumber
- get
Number(key: string):number Gets the value for the given key as a number.
Convenience method for calling
remoteConfig.getValue(key).asNumber().Parameters
key:string
Returnsnumber
getString
- get
String(key: string):string Gets the value for the given key as a String.
Convenience method for calling
remoteConfig.getValue(key).asString().Parameters
key:string
Returnsstring
getValue
setLogLevel
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-07-27 UTC.