java.lang.Object
com.adobe.marketing.mobile.edge.consent.Consent

public class Consent extends Object
  • Field Details

    • EXTENSION

      public static final Class<? extends com.adobe.marketing.mobile.Extension> EXTENSION
  • Method Details

    • extensionVersion

      @NonNull public static String extensionVersion()
      Returns the version of the Consent extension
      Returns:
      The version as String
    • update

      public static void update(@NonNull Map<String,Object> consents)
      Merges the existing consents with the given consents. Duplicate keys will take the value of those passed in the API

      Input example: {"consents": {"collect": {"val": "y"}}}

      Parameters:
      consents - A Map of consents to be merged with the existing consents
    • getConsents

      public static void getConsents(@NonNull com.adobe.marketing.mobile.AdobeCallback<Map<String,Object>> callback)
      Retrieves the current consent preferences stored in the Consent extension

      Output example: {"consents": {"collect": {"val": "y"}}}

      Parameters:
      callback - The AdobeCallback is invoked with the current consent preferences. If an AdobeCallbackWithError is provided, an AdobeError is returned when an unexpected error occurs or the request timed out