android-components / mozilla.components.feature.intent / IntentProcessor

IntentProcessor

class IntentProcessor (source)

Processor for intents which should trigger session-related actions.

Constructors

<init>

IntentProcessor(sessionUseCases: SessionUseCases, sessionManager: SessionManager, searchUseCases: SearchUseCases, useDefaultHandlers: Boolean = true, openNewTab: Boolean = true)

Processor for intents which should trigger session-related actions.

Functions

process

fun process(intent: Intent): Boolean

Processes the given intent by invoking the registered handler.

registerHandler

fun registerHandler(action: String, handler: IntentHandler): Unit

Registers the given handler to be invoked for intents with the given action. If a handler is already present it will be overwritten.

unregisterHandler

fun unregisterHandler(action: String): Unit

Removes the registered handler for the given intent action, if present.

Companion Object Properties

ACTIVE_SESSION_ID

const val ACTIVE_SESSION_ID: String