The Firebase Remote Config service interface.

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

Index

Properties

app

app: App

The app associated with the Performance service instance.

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 last successful fetch, or negative one if the RemoteConfig instance either hasn't fetched or initialization is incomplete.

lastFetchStatus

lastFetchStatus: FetchStatus

The status of the last fetch attempt.

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.

    Returns Promise<boolean>

ensureInitialized

  • ensureInitialized ( ) : Promise < void >
  • Ensures the last activated config are available to the getters.

    Returns Promise<void>

fetch

  • fetch ( ) : Promise < void >
  • Fetches and caches configuration from the Remote Config service.

    Returns Promise<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.

    Returns Promise<boolean>

getAll

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

    Returns {}

getBoolean

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

    Convenience method for calling remoteConfig.getValue(key).asBoolean().

    Parameters

    • key: string

    Returns boolean

getNumber

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

    Convenience method for calling remoteConfig.getValue(key).asNumber().

    Parameters

    • key: string

    Returns number

getString

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

    Convenience method for calling remoteConfig.getValue(key).asString().

    Parameters

    • key: string

    Returns string

getValue

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

    Parameters

    • key: string

    Returns Value

setLogLevel

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

    Parameters

    Returns void