Enum ConsentMode

java.lang.Object
java.lang.Enum<ConsentMode>
com.codename1.analytics.ConsentMode
All Implemented Interfaces:
Comparable<ConsentMode>

public enum ConsentMode extends Enum<ConsentMode>
Controls the default behaviour of Analytics before the application has recorded an explicit consent choice from the user. This is the central switch for GDPR / CCPA compliance.
  • Enum Constant Details

    • OPT_IN

      public static final ConsentMode OPT_IN
      Nothing is collected or transmitted until the application records a positive consent via Analytics.setConsent(AnalyticsConsent). This is the privacy-safe default and the recommended setting for apps distributed in regulated jurisdictions.
    • OPT_OUT

      public static final ConsentMode OPT_OUT
      Collection is active by default; the user (or the app on the user's behalf) may withdraw consent at any time. Easier adoption but places the compliance burden on the integrator.
  • Method Details

    • values

      public static ConsentMode[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static ConsentMode valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null