Class Consent
- java.lang.Object
-
- com.adobe.marketing.mobile.edge.consent.Consent
-
public class Consent extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static StringextensionVersion()Returns the version of theConsentextensionstatic voidgetConsents(com.adobe.marketing.mobile.AdobeCallback<Map<String,Object>> callback)Retrieves the current consent preferences stored in the Consent extensionstatic voidregisterExtension()Deprecated.UseMobileCore.registerExtensions(List, AdobeCallback)withEXTENSIONinstead.static voidupdate(Map<String,Object> consents)Merges the existing consents with the given consents.
-
-
-
Field Detail
-
EXTENSION
public static final Class<? extends com.adobe.marketing.mobile.Extension> EXTENSION
-
-
Method Detail
-
extensionVersion
@NonNull public static String extensionVersion()
Returns the version of theConsentextension- Returns:
- The version as
String
-
registerExtension
@Deprecated public static void registerExtension()
Deprecated.UseMobileCore.registerExtensions(List, AdobeCallback)withEXTENSIONinstead.Registers the extension with the Mobile SDK. This method should be called only once in your application class.
-
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 APIInput example: {"consents": {"collect": {"val": "y"}}}
- Parameters:
consents- AMapof 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 extensionOutput example: {"consents": {"collect": {"val": "y"}}}
- Parameters:
callback- TheAdobeCallbackis invoked with the current consent preferences. If anAdobeCallbackWithErroris provided, anAdobeErroris returned when an unexpected error occurs or the request timed out
-
-