android-components / mozilla.components.feature.session / SessionFeature

SessionFeature

class SessionFeature : LifecycleAwareFeature, UserInteractionHandler (source)

Feature implementation for connecting the engine module with the session module.

Constructors

Name Summary
<init> SessionFeature(sessionManager: SessionManager, sessionUseCases: SessionUseCases, engineView: EngineView, sessionId: String? = null)SessionFeature(sessionManager: SessionManager, goBackUseCase: GoBackUseCase, engineView: EngineView, sessionId: String? = null)
Feature implementation for connecting the engine module with the session module.

Functions

Name Summary
onBackPressed fun onBackPressed(): Boolean
Handler for back pressed events in activities that use this feature.
start fun start(): Unit
Start feature: App is in the foreground.
stop fun stop(): Unit
Stop feature: App is in the background.

Inherited Functions

Name Summary
onHomePressed open fun onHomePressed(): Boolean
In most cases, when the home button is pressed, we invoke this callback to inform the app that the user is going to leave the app.

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.