Class Identity
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidappendVisitorInfoForURL(String baseURL, com.adobe.marketing.mobile.AdobeCallback<String> callback) Appends Adobe visitor data to a URL string.static StringReturns the version of theIdentityextensionstatic voidgetExperienceCloudId(com.adobe.marketing.mobile.AdobeCallback<String> callback) Retrieves the Adobe Experience Cloud Visitor ID from the Adobe Experience Cloud ID Service.static voidgetIdentifiers(com.adobe.marketing.mobile.AdobeCallback<List<com.adobe.marketing.mobile.VisitorID>> callback) Returns all customer identifiers which were previously synced with the Adobe Experience Cloud.static voidgetUrlVariables(com.adobe.marketing.mobile.AdobeCallback<String> callback) Gets Visitor ID Service variables in URL query parameter form for consumption in hybrid app.static voidsyncIdentifier(String identifierType, String identifier, com.adobe.marketing.mobile.VisitorID.AuthenticationState authenticationState) Updates the given customer ID with the Adobe Experience Cloud ID Service.static voidsyncIdentifiers(Map<String, String> identifiers) Updates the given customer IDs with the Adobe Experience Cloud ID Service.static voidsyncIdentifiers(Map<String, String> identifiers, com.adobe.marketing.mobile.VisitorID.AuthenticationState authenticationState) Updates the given customer IDs with the Adobe Experience Cloud ID Service.
-
Field Details
-
EXTENSION
-
-
Method Details
-
extensionVersion
Returns the version of theIdentityextension- Returns:
- The version as
String
-
syncIdentifiers
Updates the given customer IDs with the Adobe Experience Cloud ID Service.Synchronizes the provided customer identifiers to the Adobe Experience Cloud ID Service. If a customer ID type matches an existing ID type and identifier, then it is updated with the new ID authentication state. New customer IDs are added. All given customer IDs are given the default authentication state of
VisitorID.AuthenticationState.UNKNOWN.These IDs are preserved between app upgrades, are saved and restored during the standard application backup process, and are removed at uninstall.
If the current SDK privacy status is
MobilePrivacyStatus.OPT_OUT, then calling this method results with no operations being performed.- Parameters:
identifiers-Map<String, String>containing identifier type as the key and identifier as the value. Both identifier type and identifier should be non empty and non null values, otherwise they will be ignored
-
syncIdentifiers
public static void syncIdentifiers(@NonNull Map<String, String> identifiers, @NonNull com.adobe.marketing.mobile.VisitorID.AuthenticationState authenticationState) Updates the given customer IDs with the Adobe Experience Cloud ID Service.Synchronizes the provided customer identifiers to the Adobe Experience Cloud ID Service. If a customer ID type matches an existing ID type and identifiers, then it is updated with the new ID authentication state. New customer IDs are added.
These IDs are preserved between app upgrades, are saved and restored during the standard application backup process, and are removed at uninstall.
If the current SDK privacy status is
MobilePrivacyStatus.OPT_OUT, then calling this method results with no operations being performed.- Parameters:
identifiers-Map<String, String>containing identifier type as the key and identifier as the value. Both identifier type and identifier should be non empty and non null values, otherwise they will be ignoredauthenticationState-VisitorIDAuthenticationStatevalue indicating authentication state for the user
-
syncIdentifier
public static void syncIdentifier(@NonNull String identifierType, @Nullable String identifier, @NonNull com.adobe.marketing.mobile.VisitorID.AuthenticationState authenticationState) Updates the given customer ID with the Adobe Experience Cloud ID Service.Synchronizes the provided customer identifier type key and value with the given authentication state to the Adobe Experience Cloud ID Service. If the given customer ID type already exists in the service, then it is updated with the new ID and authentication state. Otherwise a new customer ID is added.
This ID is preserved between app upgrades, is saved and restored during the standard application backup process, and is removed at uninstall.
If the current SDK privacy status is
MobilePrivacyStatus.OPT_OUT, then calling this method results with no operations being performed.- Parameters:
identifierType-Stringcontaining identifier type; should not be null or emptyidentifier-Stringcontaining identifier value; should not be null or emptyauthenticationState-VisitorIDAuthenticationStatevalue indicating authentication state for the user
-
appendVisitorInfoForURL
public static void appendVisitorInfoForURL(@NonNull String baseURL, @NonNull com.adobe.marketing.mobile.AdobeCallback<String> callback) Appends Adobe visitor data to a URL string.If the provided URL is null or empty, it is returned as is. Otherwise, the following information is added to the
Stringreturned in theAdobeCallback:- The
adobe_mcattribute is an URL encoded list containing:- Experience Cloud ID (ECID)
- Experience Cloud Org ID
- Analytics Tracking ID, if available from Analytics
- A timestamp taken when this request was made
- The optional
adobe_aa_vidattribute is the URL encoded Analytics Custom Visitor ID, if available from Analytics.
- Parameters:
baseURL-StringURL to which the visitor info needs to be appendedcallback-AdobeCallbackinvoked with the updated URLString; when anAdobeCallbackWithErroris provided, anAdobeErrorcan be returned in the eventuality of an unexpected error or if the default timeout (500ms) is met before the Identity URL variables are retrieved
- The
-
getUrlVariables
public static void getUrlVariables(@NonNull com.adobe.marketing.mobile.AdobeCallback<String> callback) Gets Visitor ID Service variables in URL query parameter form for consumption in hybrid app.This method will return an appropriately formed
Stringcontaining Visitor ID Service URL variables. There will be no leading & or ? punctuation, as the caller is responsible for placing it in their resultingURIin the correct location.If an error occurs while retrieving the URL string,
callbackwill be called with null. Otherwise, the following information is added to theStringreturned in theAdobeCallback:- The
adobe_mcattribute is an URL encoded list containing:- Experience Cloud ID (ECID)
- Experience Cloud Org ID
- Analytics Tracking ID, if available from Analytics
- A timestamp taken when this request was made
- The optional
adobe_aa_vidattribute is the URL encoded Analytics Custom Visitor ID, if available from Analytics.
- Parameters:
callback-AdobeCallbackwhich will be called containing Visitor ID Service URL parameters; when anAdobeCallbackWithErroris provided, anAdobeErrorcan be returned in the eventuality of an unexpected error or if the default timeout (500ms) is met before the Identity URL variables are retrieved
- The
-
getIdentifiers
public static void getIdentifiers(@NonNull com.adobe.marketing.mobile.AdobeCallback<List<com.adobe.marketing.mobile.VisitorID>> callback) Returns all customer identifiers which were previously synced with the Adobe Experience Cloud.- Parameters:
callback-AdobeCallbackinvoked with the list ofVisitorIDobjects; when anAdobeCallbackWithErroris provided, anAdobeErrorcan be returned in the eventuality of an unexpected error or if the default timeout (500ms) is met before the customer identifiers are retrieved
-
getExperienceCloudId
public static void getExperienceCloudId(@NonNull com.adobe.marketing.mobile.AdobeCallback<String> callback) Retrieves the Adobe Experience Cloud Visitor ID from the Adobe Experience Cloud ID Service.The Adobe Experience Cloud ID (ECID) is generated at initial launch and is stored and used from that point forward. This ID is preserved between app upgrades, is saved and restored during the standard application backup process, and is removed at uninstall.
- Parameters:
callback-AdobeCallbackinvoked with the ECIDString; when anAdobeCallbackWithErroris provided, anAdobeErrorcan be returned in the eventuality of an unexpected error or if the default timeout (500ms) is met before the ECID is retrieved
-