AppsFlyerConsent

总览

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

方法

forGDPRUser

方法签名

public AppsFlyerConsent forGDPRUser(Boolean hasConsentForDataUsage, Boolean hasConsentForAdsPersonalization)

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

输入参数

类型名称描述
布尔hasConsentForDataUsageIndicates whether the user give consent to send their user data to Google.
布尔hasConsentForAdsPersonalizationIndicates whether the user consented to use their data for personalized advertising.

返回

类型描述
AppsFlyerConsentAn object containing user consent data

用法示例

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

forNonGDPRUser

方法签名

public AppsFlyerConsent forNonGDPRUser()

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

返回

类型描述
AppsFlyerConsentAn empty object without any consent data.

用法示例

val nonGdprUser = AppsFlyerConsent.forNonGDPRUser()