Class UserConsentManager

    • Constructor Detail

      • UserConsentManager

        public UserConsentManager()
    • Method Detail

      • init

        public void init​(android.content.Context context)
        Description copied from class: BaseManager
        Initialize manager.
        Specified by:
        init in interface Manager
        Overrides:
        init in class BaseManager
        Parameters:
        context - the context for which manager will be initialized.
      • getSubjectToCoppa

        public java.lang.Boolean getSubjectToCoppa()
      • setSubjectToCoppa

        public void setSubjectToCoppa​(java.lang.Boolean value)
      • getCmpSdkIdForGdprTcf2

        public java.lang.Integer getCmpSdkIdForGdprTcf2()
      • setCmpSdkIdForGdprTcf2

        public void setCmpSdkIdForGdprTcf2​(java.lang.Integer id)
        Sets CMP SDK id (id must be >= 0, less than 0 is undefined). To work with GDPR TCF 2.0, set this value.

        If you want to set GDPR TCF 2.0 subject and consent, call this method before
        setSubjectToGdpr(Boolean),
        setGdprConsent(String)

      • getAnySubjectToGdpr

        public java.lang.Boolean getAnySubjectToGdpr()
      • getSubjectToGdpr

        public java.lang.String getSubjectToGdpr()
      • getSubjectToGdprBoolean

        public java.lang.Boolean getSubjectToGdprBoolean()
      • setSubjectToGdpr

        public void setSubjectToGdpr​(java.lang.Boolean value)
        Sets subject to GDPR. If CMP SDK id value is set, it sets TCF 2.0 subject, otherwise it sets TCF 1.0 subject. Null resets all subjects to GDPR.

      • setPrebidSubjectToGdpr

        public void setPrebidSubjectToGdpr​(java.lang.Boolean value)
        Gets subject to GDPR. If CMP SDK id value is set, it returns TCF 2.0 subject, otherwise it returns TCF 1.0 subject. Returns null if corresponding subject is undefined.

      • getAnyGdprConsent

        public java.lang.String getAnyGdprConsent()
      • getGdprConsent

        public java.lang.String getGdprConsent()
        Gets GDPR consent string. If CMP SDK id value is set, it gets TFC 2.0 consent, otherwise it gets TCF 1.0 consent. Returns null if corresponding consent is undefined.

      • setGdprConsent

        public void setGdprConsent​(java.lang.String consent)
        Sets GDPR consent string. If CMP SDK id value is set, it sets TFC 2.0 consent, otherwise it sets TCF 1.0 consent. Null resets all GDPR consents.

      • setPrebidGdprConsent

        public void setPrebidGdprConsent​(java.lang.String consent)
      • getAnyGdprPurposeConsents

        public java.lang.String getAnyGdprPurposeConsents()
      • getGdprPurposeConsents

        public java.lang.String getGdprPurposeConsents()
      • getAnyGdprPurposeConsent

        public java.lang.Boolean getAnyGdprPurposeConsent​(int index)
      • getGdprPurposeConsent

        public java.lang.Boolean getGdprPurposeConsent​(int index)
      • setGdprPurposeConsents

        public void setGdprPurposeConsents​(java.lang.String consent)
      • setPrebidGdprPurposeConsents

        public void setPrebidGdprPurposeConsents​(java.lang.String consent)
      • getUsPrivacyString

        public java.lang.String getUsPrivacyString()
      • setUsPrivacyString

        public void setUsPrivacyString​(java.lang.String value)
      • canAccessAnyDeviceData

        public boolean canAccessAnyDeviceData()
      • canAccessDeviceData

        public boolean canAccessDeviceData()
        Truth table. Fetches advertising identifier based TCF 2.0 Purpose1 value.

        deviceAccessConsent=true deviceAccessConsent=false deviceAccessConsent undefined

        gdprApplies=false Yes, read IDFA No, don’t read IDFA Yes, read IDFA gdprApplies=true Yes, read IDFA No, don’t read IDFA No, don’t read IDFA gdprApplies=undefined Yes, read IDFA No, don’t read IDFA Yes, read IDFA