Developer Console
Ti ringraziamo per la visita. Questa pagina è per il momento disponibile solo in inglese.

Step 1: Import TIF Companion Library (already have an app)

The TIF Companion Library provides an extensible implementation of common TV input service features. This includes required components such as TvInputService, ChannelSetupFragment, and SampleJobService. (It’s not currently part of the Android framework, and is distributed as a Gradle dependency through jcenter, not with the Android SDK.)

Get an ApplicationId

Before you can publish your app, you will need to be added to the allow list and get an application ID (applicationId). This identifier will be used in the build.graddle file for your module, replacing the existing applicationId. The code will look something like this:

applicationId "com.example.android.sampletvinput"

Adding TIF Package Dependencies

You can use the following line in the dependencies section of the app’s build.gradle file (module, not project):

implementation 'com.google.android.libraries.tv:companionlibrary:0.4.1'

Check Bintray JCenter to find the latest version of the tif-companion library.

Or, if you are using the latest Android X library in your project, please add the following line in the Gradle file instead.

implementation 'androidx.tvprovider:tvprovider:1.0.0'

Next Steps

Go to the next step: Step 2: Set Up TvInputService.


Last updated: Feb 23, 2021