Consent /5.0.0

public static class Consent

Class that represents the consent status.

Public Properties

public static bool /CanCollectPersonalInfo /+5.0.0

  • Description: Whether or not this app is allowed to collect personally identifiable information (PII) from the user.

public static Consent.Status /CurrentConsentStatus /+5.0.0

  • Description: The user’s current consent state for the app to collect personally identifiable information (PII). Refer to MoPub.Consent.Status for the values and their meanings.

public static bool /ShouldShowConsentDialog /+5.0.0

  • Description: Checks to see if a publisher should load and then show a consent dialog.

public static bool /IsConsentDialogReady /+5.4.0

  • Description: Flag indicating whether the MoPub consent dialog is currently loaded and showable.

public static bool? /IsGdprApplicable /+5.0.0

  • Description: Flag indicating whether data collection is subject to GDPR. Returns true if subject to GDPR; false if it is not, and null if unknown (that is, from startup until server responds during SDK initialization).

public static string /ConsentLanguageCode /+5.0.0

  • Description: Used to select an ISO language code (e.g., en-US) if you wish the CurrentVendorListUrl and CurrentConsentPrivacyPolicyUrl properties to point to a web resource that is localized to a specific language.

Public Methods

public static Status /FromString(string status) /+5.0.0

  • Description: Helper String to convert Android SDK consent status Strings to our Consent enum. Also handles integer values.

  • Parameters: None.

public static void /LoadConsentDialog() /+5.0.0

public static void /ShowConsentDialog() /+5.0.0

  • Description: If the MoPub consent dialog is loaded, this will take over the screen and show it.

  • Parameters: None.

public static void /ForceGdprApplicable() /+5.1.0

  • Description: Forces the SDK to treat this app as being in a GDPR region. Setting this permanently forces GDPR rules for this user unless this app is uninstalled or the data for this app is cleared.

  • Parameters: None.

Last updated October 06, 2020

TWITTER, MOPUB, and the Bird logo are trademarks of Twitter, Inc. or its affiliates. All third party logos and trademarks included are the property of their respective owners.

© 2020 MoPub (a division of Twitter, Inc.)