android-components / mozilla.components.service.fxa.manager / FxaAccountManager / <init>


FxaAccountManager(context: <ERROR CLASS>, serverConfig: ServerConfig, deviceConfig: DeviceConfig, syncConfig: SyncConfig?, applicationScopes: Set<String> = emptySet(), crashReporter: CrashReporter? = null, coroutineContext: CoroutineContext = Executors .newSingleThreadExecutor().asCoroutineDispatcher() + SupervisorJob())

An account manager which encapsulates various internal details of an account lifecycle and provides an observer interface along with a public API for interacting with an account. The internal state machine abstracts over state space as exposed by the fxaclient library, not the internal states experienced by lower-level representation of a Firefox Account; those are opaque to us.

Class is ‘open’ to facilitate testing.


context - A Context instance that’s used for internal messaging and interacting with local storage.

serverConfig - A ServerConfig used for account initialization.

deviceConfig - A description of the current device (name, type, capabilities).

syncConfig - Optional, initial sync behaviour configuration. Sync will be disabled if this is null.

applicationScopes - A set of scopes which will be requested during account authentication.