ConsentManager GDPR/CCPA SDK for Android TV

The ConsentManager SDK for Android TV apps implements and provides functionality to inform the user about data protection and ask and collect consent from the user. It enables app-developers to easily integrate the ConsentManager service into their Android TV app.

Supported Standards

The ConsentManager GDPR/CCPA SDK for Android TV supports the following industry standards:

  • IAB TCF v1
  • IAB TCF v2
  • IAB USPrivacy v1
  • ConsentManager custom vendors/purposes
  • Google Additional Consent Mode (Google AC String)

How it works

  1. Integrate the SDK into the app and configure the SDK settings
  2. Once the SDK is intergated into an app, the SDK will provide functions for the app developer in order to retrieve consent data
  3. As soon as the app starts, the SDK will automatically retrieve information from the ConsentManager servers in order to prepare the SDK for its usage.
  4. It is recommended, that on startup of the app, the app creates an instance of class CMPConsentTool. Once the this is created, the SDK will automatically show the consent screen if necessary.
  5. When the app wants to process personal data, it should "ask" the SDK if consent was given for the specific purpose and vendor.



Step 1. Add the jitpack repository to your root build.gradle at the end of repositories:

allprojects {  
  repositories {    
    maven { url '' }  

Step 2. Add the dependency to your apps build.gradle

dependencies {
  implementation 'org.bitbucket.consentmanager:android-tv-consentmanager:1.0.0'


Step 1. Add the jitpack repository to your build.gradle at the end of repositories:


Step 2. Add the dependency to your apps build.gradle


Using the library


This SDK requires the following permissions, please ensure to add them to your AndroidManifest.xml:

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />

Initiate ConsentTool

With the app-start (usually your viewDidAppear function) you must create an instance of class CMPConsentTool. This will automatically fetch the necessary data from our server and determine if the consent screen needs to be shown or not. If so, the SDK will automatically show the consent screen at this point, collect the data and provide the data to the app. The instance can then be used in order to get consent details from the SDK in order to use it in the app.

To initiate the ConsentTool, go to your targeted class and create a instance of CMPConsentTool like shown below:

import net.consentmanager.tvsdk.CMPConsentTool;
public class MainActivity extends AppCompatActivity {
    private CMPConsentTool consentTool;
    protected void onCreate(Bundle savedInstanceState) {
      consentTool = CMPConsentTool.createInstance(this, 123456, "", "MyFavouriteApp", "");
    //.. You can also instantiate the consentmanager with the advertisement id:
    // consentTool = CMPConsentTool.createWIthIDFA(this,123456,"", "myFavouriteApp", "EN", "38400000-8cf0-11bd-b23e-10b96e40000d"); 



In order to create the instance of CMPConsentTool you need to configure the instance. You will need to provide the CMP-ID, server domain , an app name and a language. The CMP-ID and server domain can be found in your ConsentManager account under Menu > Get Code. The app name can be used in order to distinguis different apps in the ConsentManager reporting. For the language you can either use an empty string ("") for auto-detection or a 2-letter language code ("EN", "DE", "FR" and so on).

The configuration values can be inserted via different ways:

a) SDK-Configuration via Manifest

Add the following lines to your AndroidManifest.xml under section <application ...> ... </application>:

<meta-data android:name="com.consentmanager.sdk.ID" android:value="1234567" />
<meta-data android:name="com.consentmanager.sdk.SERVER_DOMAIN" android:value="" />
<meta-data android:name="com.consentmanager.sdk.APP_NAME" android:value="MyFavouriteApp" />
<meta-data android:name="com.consentmanager.sdk.LANGUAGE" android:value="EN" />

If you use this way of configuration, create an instance of CMPConsentTool via:

consentTool = CMPConsentTool.createInstance(this);
b) SDK-Configuration via CMPConfig

Add the following lines to your code:

CMPConfig conf = CMPConfig.createInstance(1234567, "", "MyFavouriteApp", "EN");
consentTool = CMPConsentTool.createInstance(this, conf);
c) SDK-Configuration via createInstance()

Add the following line to your code:

consentTool = CMPConsentTool.createInstance(this, 1234567, "", "MyFavouriteApp", "EN");

Using the SDK

Please see examples for Android SDK.



Back to top