Class Identity
- java.lang.Object
-
- com.adobe.marketing.mobile.edge.identity.Identity
-
public class Identity extends Object
Defines the public APIs for the AEP Edge Identity extension.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static StringextensionVersion()Returns the version of theIdentityextensionstatic voidgetExperienceCloudId(com.adobe.marketing.mobile.AdobeCallback<String> callback)Returns the Experience Cloud ID.static voidgetIdentities(com.adobe.marketing.mobile.AdobeCallback<IdentityMap> callback)Returns all identifiers, including customer identifiers which were previously added.static voidgetUrlVariables(com.adobe.marketing.mobile.AdobeCallback<String> callback)Returns the identifiers in URL query parameter format for consumption in hybrid mobile applications.static voidregisterExtension()Deprecated.as of 2.0.0, useMobileCore.registerExtensions(List, AdobeCallback)withEXTENSIONinstead.static voidremoveIdentity(IdentityItem item, String namespace)Removes the identity from the stored client-sideIdentityMap.static voidupdateIdentities(IdentityMap identityMap)Updates the currently knownIdentityMapwithin the SDK.
-
-
-
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 theIdentityextension- Returns:
- The version as
String
-
registerExtension
@Deprecated public static void registerExtension()
Deprecated.as of 2.0.0, useMobileCore.registerExtensions(List, AdobeCallback)withEXTENSIONinstead.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-AdobeCallbackofStringinvoked with the Experience Cloud ID If anAdobeCallbackWithErroris provided, anAdobeErrorcan 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" Theadobe_mcattribute 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-AdobeCallbackofStringinvoked with a value containing the identifiers in query parameter format. If anAdobeCallbackWithErroris provided, anAdobeErrorcan 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 knownIdentityMapwithin 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 emptyidor emptynamespaceare 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-sideIdentityMap. The Identity extension will stop sending this identifier. This does not clear the identifier from the User Profile Graph.- Parameters:
item- theIdentityItemto 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-AdobeCallbackinvoked with the currentIdentityMapIf anAdobeCallbackWithErroris provided, anAdobeErrorcan be returned in the eventuality of any error that occurred while getting the stored identities.
-
-