android-components / mozilla.components.feature.accounts / FxaWebChannelFeature

FxaWebChannelFeature

class FxaWebChannelFeature : SelectionAwareSessionObserver, LifecycleAwareFeature (source)

Feature implementation that provides Firefox Accounts WebChannel support. For more information https://github.com/mozilla/fxa/blob/master/packages/fxa-content-server/docs/relier-communication-protocols/fx-webchannel.md This feature uses a web extension to communicate with FxA Web Content.

Types

Name Summary
WebChannelCommand enum class WebChannelCommand

Constructors

Name Summary
<init> FxaWebChannelFeature(context: <ERROR CLASS>, customTabSessionId: String?, engine: Engine, sessionManager: SessionManager, accountManager: FxaAccountManager, fxaCapabilities: Set<FxaCapability> = emptySet())
Feature implementation that provides Firefox Accounts WebChannel support. For more information https://github.com/mozilla/fxa/blob/master/packages/fxa-content-server/docs/relier-communication-protocols/fx-webchannel.md This feature uses a web extension to communicate with FxA Web Content.

Inherited Properties

Name Summary
activeSession open var activeSession: Session?
the currently observed session

Functions

Name Summary
onSessionAdded fun onSessionAdded(session: Session): Unit
The given session has been added.
onSessionRemoved fun onSessionRemoved(session: Session): Unit
The given session has been removed.
start fun start(): Unit

Inherited Functions

Name Summary
observeFixed fun observeFixed(session: Session): Unit
Starts observing changes to the specified session.
observeIdOrSelected fun observeIdOrSelected(sessionId: String?): Unit
Starts observing changes to the session matching the sessionId. If the session does not exist, then observe the selected session.
observeSelected fun observeSelected(): Unit
Starts observing changes to the selected session (see SessionManager.selectedSession). If a different session is selected the observer will automatically be switched over and only notified of changes to the newly selected session.
onSessionSelected open fun onSessionSelected(session: Session): Unit
The selection has changed and the given session is now the selected session.
stop open fun stop(): Unit
Stops the observer.

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.