Android OTT Device - GDPR TCF v2 Implementation

Sourcepoint's GDPR TCF v2 solution for android-based OTT devices utilizes our android SDK for the implementation. Click here to view our current android SDK documentation. In this article, we will cover how to implement your GDPR TCF v2 consent experience on android OTT devices.


Before building your ConsentLib class in Android Studio, you will need to have performed the following tasks:

  1. Declare cmplibrary as a dependency in the build.gradle file. Click here for more information.

Sourcepoint also recommends that your organization configures a privacy manager, message, scenario, etc... for the property (property group) before beginning your build for android OTT devices.

Build ConsentLib class

Once the requirements have been met, instantiate and build the SDK in your project using a builder method and pass the following information:

  • Account ID

  • Property Name

  • Property ID

  • Privacy Manager ID

  • Application Context

GDPRConsentLib.newBuilder(accountId, propertyName, propertyId, pmId, context:this)

Configure callbacks for your ConsentLibBuilder. Click here for a list of callbacks that you can use in the builder.

When implementing the builder for android compatible OTT environments, be sure to include the .setIsOTT(true) setter in the ConsentLibBuilder.

private GDPRConsentLib buildGDPRConsentLib() {
return GDPRConsentLib.newBuilder(accountId, propertyName, propertyId, pmId, context:this)
.setIsOTT(true) // Instructs the SDK to load OTT specific assets
.setOnAction(actionType -> Log.i(TAG , "ActionType: " + actionType.toString()))
.setOnConsentReady(consent -> {
// at this point it's safe to initialise vendors
for (String line : consent.toString().split("\n"))
Log.i(TAG, line);
.setOnError(error -> Log.e(TAG, "Something went wrong"))

Call .run() on the instantiated ConsentLibBuilder to trigger the consent workflow.