Deep and Universal Links

Rover supports launching Experiences and other functionality from both deep and universal links.

Deep links are for URIs that bear a custom schema specific to your app:

rv-myapp://presentExperience=…

Universal links are for URIs that are valid web URLs that your app can also handle in addition to being viewable in a vanilla web browser:

https://myapp.rover.io/…

Note that Android’s documentation does not make use of the term “Universal Links”. Android instead supports both in the same manner.

Android's documentation explains more about how to handle Links within your app: Create Deep Links to App Content.


On Android, mapping any URIs to your application must always be done with Intent Filters in your Manifest. With Rover it is no different.

Rover provides a headless activity that accepts any Rover-powered deep or universal link, TransientLinkLaunchActivity.

We’ll add an be setting up an Activity entry in your AndroidManifest.xml with three intent filters: for deep links, one for http universal links, and one for https universal links. This activity does not display anything; it will immediately open the appropriate content.

First add the Activity entry to the manifest:

<activity android:name="io.rover.experiences.ui.TransientLinkLaunchActivity">
    <!-- The below intent filters will go here, read on -->
</activity>

Now we’ll follow through with adding the three intent filters below to that Activity entry to enable the links themselves.


Many of the resources in the Rover SDK can be navigated to via “deep link”. A Rover deep link is comprised of a scheme, a path and optional parameters. An example of a Rover deep link that presents an experience might look like:

rv-myapp://presentExperience?campaignID=xxx

In this example rv-myapp is the scheme, presentExperience is the path and campaignID=xxx is a parameter.

A list of all the deep links supported by each module can be found in the Modules section of the documentation.

Each Rover account has a unique URL scheme that is used to construct Rover deep link URLs that map to your application. You can find the URL scheme assigned to your Rover account in the Rover Settings app.

Settings App

Then add an intent filter for your deep links to the manifest entry we added above for the Activity, with the deep link scheme you acquired above (here assumed to be rv-myapp):

<activity><!-- for deep links -->
    <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT"/>
        <category android:name="android.intent.category.BROWSABLE" />

        <data android:scheme="rv-myapp" />
    </intent-filter>
</activity>

Then ensure that the URL scheme is also provided to the CoreAssembler:

Rover.initialize(
    CoreAssembler(
        /* ... */
        urlSchemes = listOf("rv-myapp")
    )
    /* ... */
)

Android apps can register themselves to handle URIs launched on the device that match a given pattern. This is analagous to an iOS feature called Universal Links that allows seamless linking of content that can be accessed through both a browser and within your app. Rover supports Universal Links for presenting Experiences.

An example of a universal Experience URL might look like:

https://myapp.rover.io/my-great-experience

When a user opens this URL on a mobile device it will present the Experience directly in your app. If the user doesn’t have your app installed it will fall-back to viewing the web-based version of the Experience in the browser.

Universal links are HTTP(s) links that are hosted by Rover, offering similar functionality as deep links (but only displaying Rover Experiences), but unlike deep links they can fall back to a web-powered version of your Experience when viewed on a device without your app installed.

Similar to the URL scheme used by the Deep Links, each Rover account has a unique domain that is used to construct Rover universal links. You can find the domain assigned to your Rover account in the Rover Settings app next to the URL scheme.

Settings App

Then add the intent filter for universal links to your Activity manifest entry, given that your app universal link domain name is, for example, myapp.rover.io:

<activity><!-- for http universal links/app links -->
    <intent-filter android:autoVerify="true">
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT"/>
        <category android:name="android.intent.category.BROWSABLE" />

        <data android:scheme="http" android:host="myapp.rover.io" />
    </intent-filter>
</activity>

And then, for https:

<activity><!-- for https universal links/app links -->
    <intent-filter android:autoVerify="true">
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT"/>
        <category android:name="android.intent.category.BROWSABLE" />

        <data android:scheme="https" android:host="myapp.rover.io" />
    </intent-filter>
</activity>

Then ensure that the domain is also provided to the CoreAssembler:

Rover.initialize(
    CoreAssembler(
        /* ... */
        associatedDomains = listOf("myapp.rover.io")
    )
    /* ... */
)
Required Modules
  • Core
  • Notifications