Deep Link Handler

You will find a description about DeepLinkHandler class and methods details.


DeepLinkHandler is a interface that defines how to configure navigation between a Server-Driven screen and a native screen.


Creating a DeepLinkHandler

You have to create a class that implements the DeepLinkHandler interface and annotates it with @BeagleComponent, as listed below:

class AppDeepLinkHandler : DeepLinkHandler {
    override fun getDeepLinkIntent(
        rootView: RootView,
        path: String,
        data: Map<String, String>?,
        shouldResetApplication: Boolean
    ) = Intent(path)

In the getDeepLinkIntent method, you can configure the navigation screens of the server-driven ui flows to their native screens, making sure that Beagle recognizes your rule.

rootViewRootViewRootView holds the reference to the activity or fragment
pathStringRoute parameter that can be set by Navigate.OpenNativeRoute(route: “navigate.myview”)
dataMap<String, String>?Parameter map that can be defined by OpenNativeRoute(route = “navigate.myview” , data = mapOf(“param1” to “paramValue”))
shouldResetApplicationBooleanOpens a screen with the route informed from a new flow and clears the stack of screens for the entire application.

Once you made it, it’s necessary modify the Android manifest file:

  1. Step 1: You must add an intent filter at the activity you wish to navigate to.
  2. Step 2: You will add an action tag that will identify this activity. The id name you used here is "navigate.myview"
  3. Step 3: Add an category tag and name it "android.intent.category.DEFAULT" , like the example below:
<activity android:name=".activities.DeepLinkActivity">
        <action android:name="navigate.myview"/>
        <category android:name="android.intent.category.DEFAULT"/>


And that’s it. Now you just need to call the Navigate action with the method OpenNativeRoute like the example below:

//Widget used to navigate to a native screen
    text = "Click to navigate!",
    onPress = listOf(

Last modified February 11, 2021: create content (#298) (43225e15)