Class TCFV2StorageRepository

    • Constructor Detail

      • TCFV2StorageRepository

        TCFV2StorageRepository()
    • Method Detail

      • getVersion

         Integer getVersion()

        Get the TCF version implemented by this repository (2)

      • clearCMPKeys

         Unit clearCMPKeys(SharedPreferences sharedPreferences)

        Clear keys in SharedPreferences that belong to the TCFv1 This ensures that there is no v1 CMP in the app and that vendors will not try to read from v1

      • saveConsentInformation

         Unit saveConsentInformation(SharedPreferences sharedPreferences, ConsentToken consentToken, AppConfiguration appConfiguration, IABConfiguration vendorList, List<PublisherRestriction> publisherRestrictions, String languageCode)

        Save TCF consent information to the device https://github.com/InteractiveAdvertisingBureau/GDPR-Transparency-and-Consent-Framework/blob/master/TCFv2/IAB%20Tech%20Lab%20-%20CMP%20API%20v2.md#in-app-details

        Parameters:
        consentToken - Current user consent token
        appConfiguration - instance of AppConfiguration
        vendorList - TCF vendor list
        languageCode - 2-letter ISO language code for consent collection
      • setCMPPresent

         Unit setCMPPresent(ConfigurationRepository configurationRepository, SharedPreferences sharedPreferences)

        Create the required keys in SharedPreferences to indicate that Didomi CMP is present in the app

      • setSubjectToGDPR

         Unit setSubjectToGDPR(SharedPreferences sharedPreferences, Boolean subjectToGDPR)

        Indicate whether the user is subject to GDPR or not