Package com.my.target.common
Class MyTargetPrivacy
- java.lang.Object
-
- com.my.target.common.MyTargetPrivacy
-
public class MyTargetPrivacy extends java.lang.ObjectProvides the ability to manage the collection of personal user data in accordance with the requirements of the GDPR, CCPA and iAB.
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.BooleanccpaUserConsentjava.lang.BooleaniabUserConsentbooleanuserAgeRestrictedjava.lang.BooleanuserConsent
-
Constructor Summary
Constructors Constructor Description MyTargetPrivacy(java.lang.Boolean userConsent, java.lang.Boolean ccpaUserConsent, java.lang.Boolean iabUserConsent, boolean userAgeRestricted)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MyTargetPrivacycurrentPrivacy()booleanisConsent()Get combined consent value based on user GDPR, IAB and CCPA consent flags.static voidsetCcpaUserConsent(boolean ccpaUserConsent)Gives SDK an information about user CCPA consent.static voidsetIabUserConsent(boolean useIABUserConsentConsent)Gives SDK an information about user IAB consent.static voidsetUserAgeRestricted(boolean userAgeRestricted)Gives SDK an information about if user under age of consent or not.static voidsetUserConsent(boolean userConsent)Gives SDK an information about user GDPR consent.
-
-
-
Method Detail
-
currentPrivacy
@NonNull public static MyTargetPrivacy currentPrivacy()
- Returns:
- current privacy state
-
setUserConsent
public static void setUserConsent(boolean userConsent)
Gives SDK an information about user GDPR consent. If false, SDK will not send personal information according to GDPR rulesIt is recommended to retrieve bidder token after changing this flag, because bidder token depends on it.
- Parameters:
userConsent- GDPR consent- See Also:
MyTargetManager.getBidderToken(Context)
-
setIabUserConsent
public static void setIabUserConsent(boolean useIABUserConsentConsent)
Gives SDK an information about user IAB consent. If false, SDK will not send personal information according to IAB rulesIt is recommended to retrieve bidder token after changing this flag, because bidder token depends on it.
- Parameters:
useIABUserConsentConsent- IAB consent- See Also:
MyTargetManager.getBidderToken(Context)
-
setCcpaUserConsent
public static void setCcpaUserConsent(boolean ccpaUserConsent)
Gives SDK an information about user CCPA consent. If false, SDK will not send personal information according to CCPA rulesIt is recommended to retrieve bidder token after changing this flag, because bidder token depends on it.
- Parameters:
ccpaUserConsent- CCPA consent- See Also:
MyTargetManager.getBidderToken(Context)
-
setUserAgeRestricted
public static void setUserAgeRestricted(boolean userAgeRestricted)
Gives SDK an information about if user under age of consent or not.- Parameters:
userAgeRestricted- true if user is under age of consent
-
isConsent
public boolean isConsent()
Get combined consent value based on user GDPR, IAB and CCPA consent flags.- Returns:
- false if any of user GDPR, IAB or CCPA consent flags is set to false
- See Also:
setUserConsent(boolean),setIabUserConsent(boolean),setCcpaUserConsent(boolean)
-
-