Enum ConsentMode
- All Implemented Interfaces:
Comparable<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 Summary
Enum ConstantsEnum ConstantDescriptionNothing is collected or transmitted until the application records a positive consent viaAnalytics.setConsent(AnalyticsConsent).Collection is active by default; the user (or the app on the user's behalf) may withdraw consent at any time. -
Method Summary
Modifier and TypeMethodDescriptionstatic ConsentModeReturns the enum constant of this type with the specified name.static ConsentMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class Enum
clone, compareTo, equals, getDeclaringClass, getEnumValues, hashCode, name, ordinal, setEnumValues, toString, valueOf
-
Enum Constant Details
-
OPT_IN
Nothing is collected or transmitted until the application records a positive consent viaAnalytics.setConsent(AnalyticsConsent). This is the privacy-safe default and the recommended setting for apps distributed in regulated jurisdictions. -
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
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
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 nameNullPointerException- if the argument is null
-