The Firebase Remote Config service interface.

Do not call this constructor directly. Instead, usefirebase.remoteConfig().

Index

Properties

app

app:App

Theapp associated with thePerformance serviceinstance.

example
var app = analytics.app;

defaultConfig

defaultConfig:{}

Object containing default values for configs.

Type declaration

  • [key:string]:string |number |boolean

fetchTimeMillis

fetchTimeMillis:number

The Unix timestamp in milliseconds of the lastsuccessful fetch, or negative one iftheRemoteConfig instance either hasn't fetched or initializationis incomplete.

lastFetchStatus

lastFetchStatus:FetchStatus

The status of the last fetchattempt.

settings

settings: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

  • ensureInitialized():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

  • fetchAndActivate():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

  • getAll():{}
  • Gets all config.

    Returns{}

getBoolean

  • getBoolean(keystring):boolean
  • Gets the value for the given key as a boolean.

    Convenience method for callingremoteConfig.getValue(key).asBoolean().

    Parameters

    • key:string

    Returnsboolean

getNumber

  • getNumber(keystring):number
  • Gets the value for the given key as a number.

    Convenience method for callingremoteConfig.getValue(key).asNumber().

    Parameters

    • key:string

    Returnsnumber

getString

  • getString(keystring):string
  • Gets the value for the given key as a String.

    Convenience method for callingremoteConfig.getValue(key).asString().

    Parameters

    • key:string

    Returnsstring

getValue

  • getValue(keystring):Value
  • Gets theValue for the given key.

    Parameters

    • key:string

    ReturnsValue

setLogLevel

  • setLogLevel(logLevelLogLevel):void
  • Defines the log level to use.

    Parameters

    Returnsvoid

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.