Class Identity


  • public class Identity
    extends Object
    Defines the public APIs for the AEP Edge Identity extension.
    • 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 the Identity extension
        Returns:
        The version as String
      • registerExtension

        @Deprecated
        public static void registerExtension()
        Deprecated.
        as of 2.0.0, use MobileCore.registerExtensions(List, AdobeCallback) with EXTENSION instead.
        Registers the extension with the Mobile SDK. This method should be called only once in your application class.
      • getExperienceCloudId

        public static void getExperienceCloudId​(@NonNull
                                                com.adobe.marketing.mobile.AdobeCallback<String> callback)
        Returns the Experience Cloud ID. An empty string is returned if the Experience Cloud ID was previously cleared.
        Parameters:
        callback - AdobeCallback of String invoked with the Experience Cloud ID If an AdobeCallbackWithError is provided, an AdobeError can be returned in the eventuality of any error that occurred while getting the Experience Cloud ID
      • getUrlVariables

        public static void getUrlVariables​(@NonNull
                                           com.adobe.marketing.mobile.AdobeCallback<String> callback)
        Returns the identifiers in URL query parameter format for consumption in hybrid mobile applications. There is no leading & or ? punctuation as the caller is responsible for placing the variables in their resulting URL in the correct locations. If an error occurs while retrieving the URL variables, the AdobeCallbackWithError is called with a null value and AdobeError instance. If AdobeCallback is provided then callback is not called in case of error. Otherwise, the encoded string is returned, for ex: "adobe_mc=TS%3DTIMESTAMP_VALUE%7CMCMID%3DYOUR_ECID%7CMCORGID%3D9YOUR_EXPERIENCE_CLOUD_ID" The adobe_mc attribute is an URL encoded list that contains:
        • TS: a timestamp taken when the request was made
        • MCID: Experience Cloud ID (ECID)
        • MCORGID: Experience Cloud Org ID
        Parameters:
        callback - AdobeCallback of String invoked with a value containing the identifiers in query parameter format. If an AdobeCallbackWithError is provided, an AdobeError can be returned in the eventuality of any error that occurred while getting the identifiers query string
      • updateIdentities

        public static void updateIdentities​(@NonNull
                                            IdentityMap identityMap)
        Updates the currently known IdentityMap within the SDK. The Identity extension will merge the received identifiers with the previously saved one in an additive manner, no identifiers will be removed using this API. Identifiers which have an empty id or empty namespace are not allowed and are ignored.
        Parameters:
        identityMap - The identifiers to add or update.
      • removeIdentity

        public static void removeIdentity​(@NonNull
                                          IdentityItem item,
                                          @NonNull
                                          String namespace)
        Removes the identity from the stored client-side IdentityMap. The Identity extension will stop sending this identifier. This does not clear the identifier from the User Profile Graph.
        Parameters:
        item - the IdentityItem to remove.
        namespace - The namespace of the identity to remove.
      • getIdentities

        public static void getIdentities​(@NonNull
                                         com.adobe.marketing.mobile.AdobeCallback<IdentityMap> callback)
        Returns all identifiers, including customer identifiers which were previously added.
        Parameters:
        callback - AdobeCallback invoked with the current IdentityMap If an AdobeCallbackWithError is provided, an AdobeError can be returned in the eventuality of any error that occurred while getting the stored identities.