Info
Content

ConsentManager Android

API


 

openCmpLayer


Returns if the purpose (id) has the rights to set cookies

Parameters
Name Type

Description

id String:

The id of the purpose

Attention: The purpose id is the same as shown in the purpose list and can have a prefix like C

Returns 
Type Description
Boolean If the purpose has the consent to set cookies

 

Example
val vendorId = "S123"

consentTool.hasPurpose(vendorId)

 

hasVendor


Returns if the vendor (id) has the rights to set cookies

Parameters
Name Type

Description

id String:

The id of the vendor

Attention: The vendor id is the same as shown in the purpose list and can have a prefix like C

Returns 
Type Description
Boolean If the purpose has the consent to set cookies

 

Example
val vendorId = "S123"

consentTool.hasVendor(vendorId)

 

hasPurpose


Returns if the purpose (id) has the rights to set cookies

Parameters
Name Type

Description

id String:

The id of the purpose

Attention: The purpose id is the same as shown in the purpose list and can have a prefix like C

Returns 
Type Description
Boolean If the purpose has the consent to set cookies

 

Example
val vendorId = "S123"

consentTool.hasPurpose(vendorId)

 

getVendorString


Returns if the purpose (id) has the rights to set cookies

Parameters
Name Type

Description

id String:

The id of the purpose

Attention: The purpose id is the same as shown in the purpose list and can have a prefix like C

Returns 
Type Description
Boolean If the purpose has the consent to set cookies

 

Example
val vendorId = "S123"

consentTool.hasPurpose(vendorId)

 

 

getPurposeString


Returns the purposes String, that was set by consentmanager

Parameters

no parameters

Returns 
Type Description
String

The String of purposes that was set through consentmanager

 

 

Example
val vendorId = "S123"

consentTool.hasPurpose(vendorId)

 

getPurposes


Returns the purposes String, that was set by consentmanager in a List object

Parameters
Name Type

Description

id String:

The id of the purpose

Attention: The purpose id is the same as shown in the purpose list and can have a prefix like C

Returns 
Type Description
Boolean If the purpose has the consent to set cookies

 

Example
val vendorId = "S123"

consentTool.hasPurpose(vendorId)

 

getVendors


Returns the Vendor String, that was set by consentmanager in a List object

Parameters
Name Type

Description

id String:

The id of the purpose

Attention: The purpose id is the same as shown in the purpose list and can have a prefix like C

Returns 
Type Description
Boolean If the purpose has the consent to set cookies

 

Example
val vendorId = "S123"

consentTool.hasPurpose(vendorId)

 

getGoogleAddtlConsent


Returns the Google Addtl String, that was set by consentmanager

Parameters
Name Type

Description

id String:

The id of the purpose

Attention: The purpose id is the same as shown in the purpose list and can have a prefix like C

Returns 
Type Description
Boolean If the purpose has the consent to set cookies

 

Example
val vendorId = "S123"

consentTool.hasPurpose(vendorId)

 

getUsPrivacyString


Returns the US Privacy String, that was set by consentmanager

Parameters
Name Type

Description

id String:

The id of the purpose

Attention: The purpose id is the same as shown in the purpose list and can have a prefix like C

Returns 
Type Description
Boolean If the purpose has the consent to set cookies

 

Example
val vendorId = "S123"

consentTool.hasPurpose(vendorId)

 

getLastRequest


Gives information about the last date the server was contacted

Parameters
Name Type

Description

id String:

The id of the purpose

Attention: The purpose id is the same as shown in the purpose list and can have a prefix like C

Returns 
Type Description
Date

Date when the server was called last

 

Example
val vendorId = "S123"

consentTool.hasPurpose(vendorId)

 

needUserConsent


Returns if the purpose (id) has the rights to set cookies

Parameters
Name Type

Description

id String:

The id of the purpose

Attention: The purpose id is the same as shown in the purpose list and can have a prefix like C

Returns 
Type Description
Boolean If the purpose has the consent to set cookies

 

Example
val vendorId = "S123"

consentTool.hasPurpose(vendorId)

 

exportConsentString


An export Function that can be called to export the full consentString generated by a ConsentWebView and saved in the Shared Preferences of this device.

Parameters
Name Type

Description

id String:

The id of the purpose

Attention: The purpose id is the same as shown in the purpose list and can have a prefix like C

Returns 
Type Description
Boolean If the purpose has the consent to set cookies

 

Example
val vendorId = "S123"

consentTool.hasPurpose(vendorId)

 

importConstenString


An import Method that can be called to import the full consentString generated by a ConsentWebView into the Shared Preferences of this device.

Parameters
Name Type

Description

id String:

The id of the purpose

Attention: The purpose id is the same as shown in the purpose list and can have a prefix like C

Returns 
Type Description
Boolean If the purpose has the consent to set cookies

 

Example
val vendorId = "S123"

consentTool.hasPurpose(vendorId)

 

createPlaceholderView


Creates a placeholder view for dynamic content blocking

Parameters
Name Type

Description

id String:

The id of the purpose

Attention: The purpose id is the same as shown in the purpose list and can have a prefix like C

Returns 
Type Description
Boolean If the purpose has the consent to set cookies

 

Example
val vendorId = "S123"

consentTool.hasPurpose(vendorId)

 

reset


Resets consent data

Parameters
Name Type

Description

id String:

The id of the purpose

Attention: The purpose id is the same as shown in the purpose list and can have a prefix like C

Returns 
Type Description
Boolean If the purpose has the consent to set cookies

 

Example
val vendorId = "S123"

consentTool.hasPurpose(vendorId)

 

setConsentString


Returns if the purpose (id) has the rights to set cookies

Parameters
Name Type

Description

id String:

The id of the purpose

Attention: The purpose id is the same as shown in the purpose list and can have a prefix like C

Returns 
Type Description
Boolean If the purpose has the consent to set cookies

 

Example
val vendorId = "S123"

consentTool.hasPurpose(vendorId)

 

getGoogleAddtlConsent


Returns if the purpose (id) has the rights to set cookies

Parameters
Name Type

Description

id String:

The id of the purpose

Attention: The purpose id is the same as shown in the purpose list and can have a prefix like C

Returns 
Type Description
Boolean If the purpose has the consent to set cookies

 

Example
val vendorId = "S123"

consentTool.hasPurpose(vendorId)

 

 

 

Back to top