Android TV
Learn to install the Tealium SDK for Android TV.
Requirements
- Android TV app with Tealium for Android
- Android (Lollipop/5.0+ / API Level 21+ for Android TV)
- Android (Lollipop/5.1+ / API Level 22+ for Fire TV)
- Tealium iQ Mobile Profile
- Tealium Customer Data Hub account
API Reference
For the complete reference of classes and methods for Android TV, see the com.tealium.library
package in the Tealium SDK for Android API (it is the same for Android TV).
Sample App
To help familiarize yourself with the Tealium library, tracking methods, and best practice implementation, explore the Tealium for Android TV sample app.
To abstract the Tealium implementation from the rest of your app, we recommend the use of the sample helper class. This gives you a single entry point from which to initialize and make tracking calls. It also allows you to update the code in your helper file, and not in every single Java file.
Install
Install Tealium for Android TV on any Android TV device, including Amazon Fire TV.
Android TV Device
To install Tealium for Android TV, the installation steps are the same as found on the Tealium for Android install guide.
Amazon Fire TV
It is recommended to leverage Tealium when developing using the Amazon’s Fire TV Fire App Builder framework. Tealium is a vendor-neutral solution allowing you to send your data to multiple platforms without being locked into a single vendor.
Clone this fork of Amazon’s Fire App Builder library to get started with developing streaming apps on Fire TV and leverage the Tealium SDK.
Tracking
Track Views
The trackView()
method tracks screen views, as shown in the following example:
Map<String, Object> data = new HashMap<>(1);
data.put("KEY", "VALUE");
Tealium.getInstance("INSTANCE KEY").trackView("SCREEN_NAME", data);
Track Events
The trackEvent()
method tracks non-view events, as shown in the following example:
Map<String, Object> data = new HashMap<>(1);
data.put("KEY", "VALUE");
Tealium.getInstance("INSTANCE KEY").trackEvent("EVENT NAME"", data);
This page was last updated: January 7, 2023