ConsentLibBuilder Methods

In the following table, please find the various methods that can be used in the ConsentLibBuilder:



.setStagingCampaign(boolean env)

Passing true to this method will instruct the SDK to load a Stage campaign


Receives a callback as parameter. The callback is called when the ConsentUI is loaded and ready to be presented to the user

.setTargetingParams(key, value)

Click here to learn more about setting target params


Instructs the SDK to load OTT specific assets

.setMessageTimeOut(int milliseconds)

Value defaults to 10 seconds. Controls how long it takes between calling .run() and one of the callbacks such as .onConsentUIReady / .onConsentReady / .onError

.setAuthId(string authID)

Click here to learn more about authenticated consent.

.setOnBeforeSendingConsent(_Callback_ConsentAction action)

Method is called just before sending the consent action taken by the user to the server

.setShouldCleanConsentOnError(boolean flag)

By default, the flag is set to true. If set to false, the SDK will not wipe consent data when the .onError callback is called.

.setMessageLanguage(MessageLanguage messageLanguage)

Set the language parameter to receive a message in the same language. If the selected parameter is not available than the message experience will automatically default to the configured default language for the message.