Android TV SDK Setup
How to install the Airship SDK on Android TV.
You can use Airship to send messages to your app on Android TV devices. Create Android TV messages the same way as messages for Android devices and then target the corresponding platform to reach the Android TV devices. To target Android TV, you just need to send the message to Android. 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 are supported for Android TV, without the need for development work.
1. Modal, Fullscreen, and Banner message styles are supported.
2. The
OpenExternalUrlAction
to open URLs in messages will not work, as Android TV does not have a web browser.
Requirements
- Minimum Android version supported
21+
- Compile SDK version
31+
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. Android TV receives messages via FCM, so you’ll
need to include the urbanairship-fcm
provider in order to receive notifications.
Example installation
dependencies {
val airshipVersion = "16.8.0"
// FCM push provider
implementation("com.urbanairship.android:urbanairship-fcm:$airshipVersion")
// In-App Automation
implementation("com.urbanairship.android:urbanairship-automation:$airshipVersion")
// Message Center
implementation("com.urbanairship.android:urbanairship-message-center:$airshipVersion")
}
All Airship dependencies included in the build.gradle.kts
file should all specify the exact same version.
dependencies {
def airshipVersion = "16.8.0"
// FCM push provider
implementation "com.urbanairship.android:urbanairship-fcm:$airshipVersion"
// In-App Automation
implementation "com.urbanairship.android:urbanairship-automation:$airshipVersion"
// Message Center
implementation "com.urbanairship.android:urbanairship-message-center:$airshipVersion"
}
All Airship dependencies included in the build.gradle
file should all specify the exact same version.
FCM setup
Follow FCM Android Setup to configure your Android application to connect to Firebase.
Configure and initialize Airship
Android TV is supported via the native Android Airship SDK, and makes use of the same process to configure and initialize Airship on Android TV devices. Refer to the Android SDK Setup guide for further set up instructions.
Categories