Package 

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

      • getIABPurposeIds

         final List<Integer> getIABPurposeIds(Iterable<Purpose> purposes, Boolean isSpecialFeature)

        Get IAB IDs from a list of purposes

        Parameters:
        purposes - List of purposes
        isSpecialFeature - Whether we want to return IDs from purposes (false) or special features (true)
      • saveConsentInformation

         Unit saveConsentInformation(SharedPreferences sharedPreferences, Integer vendorListMaxVendorId, Integer vendorListVersion, 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:
        vendorListMaxVendorId - Not used
        vendorListVersion - Not used
        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(SharedPreferences sharedPreferences)

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

      • setSubjectToGDPR

         Unit setSubjectToGDPR(SharedPreferences sharedPreferences, Boolean subjectToGDPR)

        Indicate whether the user is subject to GDPR or not