Fire TV SDK Setup

How to install the Airship SDK on Fire TV.

You can use Airship to send messages to your app on Fire TV devices. Create Fire TV messages the same way as messages for Amazon devices and then target the corresponding platform to reach the Fire TV devices. To target Fire TV, you just need to send the message to Amazon. The messages can be sent via Push Notification, In-App Messages and In-App Automation, and Message Center by specifying users (segment, named user, or channel ID).

The following message types and features are supported for Amazon Fire TV, without the need for development work.

Message type or featureFire TV
Push NotificationA message that can appear on any screen on a mobile device. Push notifications appear as banners.1
In-App AutomationMessages that are cached on users’ devices and displayed when your users meet certain conditions within your app, such as viewing a particular screen or opening the app a certain number of times.
Message CenterA place in your app where you can display persistent rich messages, including HTML, video, etc. Similar to email, Message Center represents both the medium (the in-app inbox) and the message type (the messages you send to the inbox).2
In-App MessageA message that appears inside of your app. You can send in-app messages to your entire app audience, not just users who have opted-in to push notifications. (standard)
Feature FlagA toggle for controlling the availability of content or functionality in your app or website.

1. The notification will appear in the notification tray. Not supported for Fire TV: buttons, Summary field, Share action, and high priority push (heads-up notifications).
2. The MessageCenterAction opens the Message Center but does not directly open the message. If a web browser is installed, URLs function as button actions.

Requirements

  • Minimum Android version supported 21+
  • Compile SDK version 33+

SDK Installation

The Airship SDK is split into modules which allow you to choose the push providers and features to be included in your application. Fire TV receives messages via ADM, so you’ll need to include the urbanairship-adm provider in order to receive notifications.

Example installation

app build.gradle.kts

dependencies {

    val airshipVersion = "17.5.0"
    
    // ADM push provider
    implementation("com.urbanairship.android:urbanairship-adm:$airshipVersion")

    // Message Center
    implementation("com.urbanairship.android:urbanairship-message-center:$airshipVersion")
    
    // Feature Flags
    implementation("com.urbanairship.android:urbanairship-feature-flag:$airshipVersion")
}
 Note

All Airship dependencies included in the build.gradle.kts file should all specify the exact same version.

app build.gradle

dependencies {

    def airshipVersion = "17.5.0"
    
    // ADM push provider
    implementation "com.urbanairship.android:urbanairship-adm:$airshipVersion"
    
    // Message Center
    implementation "com.urbanairship.android:urbanairship-message-center:$airshipVersion"
}
 Note

All Airship dependencies included in the build.gradle file should all specify the exact same version.

ADM setup

Follow Amazon’s documentation to store your API key as an asset.

Configure and initialize Airship

Fire TV is supported via the native Android Airship SDK, and makes use of the same process to configure and initialize Airship on Fire TV devices. Refer to the Android SDK Setup guide for further set up instructions.