AppsFlyerConsent

Overview

AppsFlyerConsent encapsulates the methods for acquiring consent data required by the Digital Marketing Act (DMA).

Methods

forGDPRUser

Method signature

public AppsFlyerConsent forGDPRUser(Boolean hasConsentForDataUsage, Boolean hasConsentForAdsPersonalization)

Description
Acquires user consent for data usage and ad personalization. Call the function when DMA is applicable to the user.

Input arguments

TypeNameDescription
BooleanhasConsentForDataUsageIndicates whether the user give consent to send their user data to Google.
BooleanhasConsentForAdsPersonalizationIndicates whether the user consented to use their data for personalized advertising.

Returns

TypeDescription
AppsFlyerConsentAn object containing user consent data

Usage example

AppsFlyerConsent gdprUserConsent = AppsFlyerConsent.forGDPRUser(hasConsentForDataUsage, hasConsentForAdsPersonalization); 

forNonGDPRUser

Method signature

public AppsFlyerConsent forNonGDPRUser()

Description
Return an empty AppsFlyerConsent object without any consent data. Call the method when DMA is not applicable to the user.

Returns

TypeDescription
AppsFlyerConsentAn empty object without any consent data.

Usage example

val nonGdprUser = AppsFlyerConsent.forNonGDPRUser()