Android Privacy Methods

Chartboost requires that publishers obtain consent from their users to be able to process personal data and provide relevant ads.
addDataUseConsent is the new public api usage to set consent values. This new API provides user consent data for privacy laws currently in existence or future laws. Replaces CBPIDataUseConsent method.

GDPR

/**
 * GDPR support settings:
 * NON_BEHAVIORAL(0) means the user does not consent to targeting (Contextual ads)
 * BEHAVIORAL(1) means the user consents (Behavioral and Contextual Ads)
 */ 
 DataUseConsent dataUseConsent = new GDPR(GDPR.GDPR_CONSENT.BEHAVIORAL);
 Chartboost.addDataUseConsent(context, dataUseConsent);

CCPA

/**
 * CCPA support settings:
 * OPT_IN_SALE(1NN-) means the user consents (Behavioral and Contextual Ads)
 * OPT_OUT_SALE(1NY-) means the user does not consent to targeting (Contextual ads)
 */
DataUseConsent dataUseConsent = new CCPA(CCPA.CCPA_CONSENT.OPT_IN_SALE);
Chartboost.addDataUseConsent(context, dataUseConsent);

Custom Consent

Chartboost allows publishers to provide custom consent information, besides the predefined GDPR and CCPA values.
For example:
DataUseConsent dataUseConsent = new Custom("name", "value");
Chartboost.addDataUseConsent(context, dataUseConsent);
Currently, the only custom consent values allowed are valid IAB’s U.S. Privacy String for the CCPA standard.