Skip to main content

SetConsent

AndroidiOS
If you were looking for the method for use with Unreal Engine, see SetConsent for Unreal Engine SDK.

Sets consent for EU user consent policy. Call SetConsent to update the user consent status after the app is launched.

The user consent status is reset every time the app is launched, call SetConsent every time after app launch if update of user consent is required.

Function definition

public static void SetConsent(FINTLConsentStatus status, string types = "", string specificChannel = "");

Input parameters

ParameterTypeDescriptionRemarks
statusFINTLConsentStatusUser consent statusrequired
typesstringTypes of permissions with user consent (separated by commas ',')Optional, uses the value of ANALYTICS_CONSENT_REQUIRED_TYPE in INTLConfig.ini when empty
specificChannelstringUA channels that require special settingsOptional, uses the value of ANALYTICS_CONSENT_CHANNEL in INTLConfig.ini when empty

Consent status (FINTLConsentStatus)

TypeDescription
kConsentStatusDeniedConsent denied
kConsentStatusGrantedConsent granted

Code sample

INTLAPI.SetConsent(kConsentStatusGranted);