Amazon Developer

as

Settings
Sign out
Notifications
Alexa
Amazon Appstore
Ring
AWS
Documentation
Support
Contact Us
My Cases
Develop
Test
Publish
Monetize
Engage users
Device specifications
Resources
Skip to main content
Deep linking refers to links that direct users past the homepage of an app to specific content inside the app. In the context of merchandising, deep links take users from the merchandising placement to the exact content promoted in the merchandising, assuming the user has already downloaded your app. To set up deep linking, you must provide an encoded deep link intent that points to your content. Amazon will then implement this deep link intent with your campaign. Deep links take users from the Fire TV OS into a specific destination within an app on Fire TV. Within the context of featured content, deep links take users to the content being promoted. For example, if a merchandising placement for “ACME Media” promotes a Football Playoff game, any ACME customers who click on the Football Playoff placement will be taken directly to the page for that Football Playoff game within the app, where they can watch the game or record it for future viewing. If the customer has not previously downloaded your app on their Fire TV, the campaign will take users to your app details page, where the user can choose to download and open your app. After users download and open your app, they will be taken directly to the content promoted in the campaign. Overall, deep linking gives more immediacy and continuity to the featured content displayed on Fire TV because the deep link provides a seamless transition from the content displayed in the campaign to the destination in the app for that same content.

Prerequisites

You will need to use Android Studio and adb to generate the encoded deep link intent. adb is installed by default with Android Studio. If you’re new to adb and need more info on setting it up, see Android Debug Bridge (ADB) in the Android docs. You need to generate out an encoded deep link intent by customizing some code in a simple app. Your customizations for the deep link intent will depend on the parameters used in your adb command. To generate an encoded deep link intent to your content, see the following two sections.

Step 1: Create adb Command That Deep Links to your Media

If you already know the deep link intent values for your media, you can proceed directly to the next section, Step 2: Encode your Deep Link Intent Using Android Studio. However, you should still configure an adb command to test that the values surface your media, because there’s no other way to test the deep link intent before submitting it. To create an adb command to your media:
  1. Create an adb command that provides your deep link intent. For example, your adb command to play the media might look like this:
    In Android, deep links can be structured in different ways, and how each app chooses to structure deep links is known only to the app. You might use different parameters and components in your command. Your adb command will typically use adb shell am start and several parameters:
    • -a (action) - specifies the intent action
    • -n (package + component) - specifies the package and component name
    • -d (data_uri) - specifies the intent data URI
    For a description of parameters to pass into adb, see Specification for intent arguments in the Android docs. For more general information about creating deep links, see Create Deep Links to App Content.
  2. Connect adb to Fire TV and run your adb command. (For help connecting, see Connect to Fire TV Through ADB.)
  3. Make sure that the right media appears on your Fire TV. (If the adb command fails, then the encoded deep link that you generate in the next section will also fail.)
You need to convert your adb command (deep link intent) to an encoded string. To do this, you will download a simple Android app. The app has an a class with various methods that you will customize as needed. In the app, you will take the parameters from your adb command and store them in an intent object called amazonIntent. After adding all your adb parameters into amazonIntent, the toURI method converts this amazonIntent object into an encoded URI string. The encoded URI string contains all the information from your adb command (the action, package, component, flags, extra, etc.). When you run the Android app, the encoded URI string gets printed in the Logcat console. To generate your encoded deep link intent in Android Studio:
  1. Download this simple Android app: toURI. After downloading it, unzip it.
  2. Open Android Studio and open the toURI app. (When you open the app, Android Studio will automatically update the location of the Android SDK.)
  3. In MainActivity.java file (inside app/java/com/example/touri), customize the code based on the description in the comments. There are six sections to customize.
  4. After you finish customizing the code, click the Run App button Run 'app' and run the application on any device (any emulator or connected Fire TV device, etc.).
  5. Open Logcat and filter on the word “amazon”. The value appears after “amazon_intent=:”.
    Filtering for amazon to get the encoded deep link intent

    Filtering for amazon to get the encoded deep link intent

    The value will be an encoded string such as this:
  6. Copy the value and send this to your Amazon representative.
In most cases, users will click the campaign and the media from your app will open and play. However, you should handle scenarios where the deep link might be destroyed before the user opens the app, or cases where (for whatever reason) the media in the deep link isn’t available. In those cases, you might decide to take users to your homepage instead. The following diagram shows scenarios where the deep link might be destroyed.
Workflow for deep links

Workflow for deep links

After clicking the campaign, if the user does not have the app, the user is taken to the app details page with the option to download the app. The deep link intent will be stored in memory as long as the app details page remains active. (This is called “deferred deep linking.”) However, the stored intent data will be removed if the user navigates away from the details page. For example, suppose the user installs the app, but before the user opens the app, the user navigates elsewhere (perhaps the user is impatient in waiting for the download to finish). When the user returns and opens the app, the deep link content will have been removed because the user navigated away from the app details page. In these cases, take the user to your homepage instead.

FAQ

Last modified on February 2, 2026