Android & AndroidTV: Methods

Android & AndroidTV: Methods

CMP UI methods

  1. CMP.showConsentTool(true, cmpHandler);
Returns true/false in cmpHandler whether or not the consent interface was shown

Obtaining consents methods

  1. String consentString = CMP.getConsentString();
Returns the consent string, if there is no consent string returns null


Example with provider “Amobee, Inc.” which is the id 23:
  1. Boolean status = CMP.isConsentVendorStatus(23);
Returns true if it has the consent, null if not or if the vendor does not exist.


Example with “googleConsent” provider:
  1. Boolean status = CMP.isThirdDataConsentVendorStatus("googleConsent"); 
Returns true if it has the consent, false if not, and null if the vendor does not exist.


Status of a vendor

 Description: decodes de consent of a given TCF vendor

  1. isConsentVendorStatus([vendor_number])


 Result expected: true if the vendor has been accepted / false if the vendor has been rejected

 

Status of a custom non TCF vendor

Description: decodes de consent of a given non TCF vendor

  1. isThirdDataConsentVendorStatus([vendor_name])


Result expected: true if the vendor has been accepted / false if the vendor has been rejected

Available vendor names (check if you have the vendor configured first):

[vendor_name]=google

[vendor_name]=charbeat

[vendor_name]=facebook

 

Status of a TCF vendor legitimate interest

 

Description: decodes the consent given to a TCF vendor as per Legitimate interest
  1.  isVendorLegitimateInterestStatus([vendor_number])

 

Result expected: true if the vendor has been accepted / false if the vendor has been rejected

 

Description: decodes the consent of Consent Purpose (for TCF vendors)

  1. isConsentPurposeVendorStatus([purpose_number])

Result expected: true if the given consent purpose for TCF vendors has been accepted / false if has been rejected

 

Status of Legitimate interest purpose (for TCF vendors)

 Description: decodes the consent of a purpose as per legitimate interest (for TCF vendors)


  1. isVendorPurposeLegitimateInterestStatus ([purpose_number])


Result expected: true if the given Legitimate interest purpose for TCF vendors has been accepted / false if has been rejected

 

 

Description: decodes the consent of Consent Purpose (for publisher)

 

  1. isPublisherConsentStatus([purpose_number])

Result expected: true if the given consent purpose for publisher has been accepted / false if has been rejected

 

Status of Legitimate interest purpose (for publisher)

 

Description: decodes the consent of a purpose as per legitimate interest (for publisher)


  1. isPublisherLegitimateInterestStatus([purpose_number])


Result expected: true if the given Legitimate interest purpose publisher has been accepted / false if has been rejected

 

Status of special features

 

Description: decodes the consent of special features

 

  1. isSpecialFeatureStatus([special_feature_number])


Result expected: true if the given special feature has been accepted / false if has been rejected

 

Combined status

 

Description: decodes the consent different items


  1. isAllAcceptedCustom()


It can contain 8 different lists (it can work with less than 8 lists)

 

Order of the list and parameters is as follows:

 

1.       vendors: List<Int> = listOf(), //list of vendors consent TCF

2.       vendorsLegitimateInterest: List<Int> = listOf(), //list of vendors LI TCF

3.       thirdDataConsentVendors: List<String> = listOf(), //list of custom vendors

4.       vendorsPurpose: List<Int> = listOf(), //list of consent to purposes TCF

5.       vendorsPurposeLegitimateInterest: List<Int> = listOf(), // list of Legitimate interest  purposes TCF

6.       List<Int> = listOf(), // list of consent to purposes publisher

7.       publishersLegitimateInterest: List<Int> = listOf(), // list of Legitimate interest  purposes publisher

8.       specialFeatures: List<Int> = listOf() //list of  special features

 

Examples Kotlin:

 

Vendors consents only

 

List=1;

 

isAllAcceptedCustom(listOf(1,2))

 

Vendors consents + custom vendor = Google

 

List=1; List=3;

 

isAllAcceptedCustom(listOf(1,2), listOf(),listOf("googleConsent", "vendor1"))

 

List 2 need to be included but it should be empty