android-components / / AppLinksFeature / <init>


AppLinksFeature(context: <ERROR CLASS>, sessionManager: SessionManager, sessionId: String? = null, fragmentManager: FragmentManager? = null, dialog: RedirectDialogFragment? = null, launchInApp: () -> Boolean = { false }, useCases: AppLinksUseCases = AppLinksUseCases(context, launchInApp), failedToLaunchAction: () -> Unit = {})

This feature implements observer for handling redirects to external apps. The users are asked to confirm their intention before leaving the app if in private session. These include the Android Intents, custom schemes and support for Intent.CATEGORY_BROWSABLE http(s) URLs.

It requires: a Context, and a FragmentManager.


context - Context the feature is associated with.

sessionManager - Provides access to a centralized registry of all active sessions.

sessionId - the session ID to observe.

fragmentManager - FragmentManager for interacting with fragments.

dialog - The dialog for redirect.

launchInApp - If {true} then launch app links in third party app(s). Default to false because of security concerns.

useCases - These use cases allow for the detection of, and opening of links that other apps have registered to open.