ConsentRequestParameters.Builder

public final class ConsentRequestParameters.Builder


Builder of ConsentRequestParameters.

Summary

Public constructors

Public methods

ConsentRequestParameters
ConsentRequestParameters.Builder

Sets the ConsentDebugSettings.

ConsentRequestParameters.Builder

Sets the consent sync ID to sync the user consent status collected with the same ID.

ConsentRequestParameters.Builder
@CanIgnoreReturnValue
setTagForUnderAgeOfConsent(boolean tagForUnderAgeOfConsent)

Sets whether the user is tagged for under age of consent.

Public constructors

Builder

public Builder()

Public methods

build

public ConsentRequestParameters build()

setConsentDebugSettings

@CanIgnoreReturnValue
public ConsentRequestParameters.Builder setConsentDebugSettings(
    @Nullable ConsentDebugSettings consentDebugSettings
)

Sets the ConsentDebugSettings.

If null, no debug setting will be used.

setConsentSyncId

@CanIgnoreReturnValue
public ConsentRequestParameters.Builder setConsentSyncId(String consentSyncId)

Sets the consent sync ID to sync the user consent status collected with the same ID.

The consent sync ID must meet the following requirements:

  • Constructed as a UUID string as matches the regular expression (regex) ^[0-9a-zA-Z+.=\/_\-$,{}]{22,150}$
  • A minimum of 22 characters.
  • A maximum of 150 characters.

Failure to meet the requirements results in the consent sync ID not being set and the UMP SDK logging a warning to the console.

setTagForUnderAgeOfConsent

@CanIgnoreReturnValue
public ConsentRequestParameters.Builder setTagForUnderAgeOfConsent(boolean tagForUnderAgeOfConsent)

Sets whether the user is tagged for under age of consent.

Default value is false.