Class Identity

java.lang.Object
com.adobe.marketing.mobile.Identity

public class Identity extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Class<? extends com.adobe.marketing.mobile.Extension>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    appendVisitorInfoForURL(String baseURL, com.adobe.marketing.mobile.AdobeCallback<String> callback)
    Appends Adobe visitor data to a URL string.
    static String
    Returns the version of the Identity extension
    static void
    getExperienceCloudId(com.adobe.marketing.mobile.AdobeCallback<String> callback)
    Retrieves the Adobe Experience Cloud Visitor ID from the Adobe Experience Cloud ID Service.
    static void
    getIdentifiers(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 void
    getUrlVariables(com.adobe.marketing.mobile.AdobeCallback<String> callback)
    Gets Visitor ID Service variables in URL query parameter form for consumption in hybrid app.
    static void
    syncIdentifier(String identifierType, String identifier, com.adobe.marketing.mobile.VisitorID.AuthenticationState authenticationState)
    Updates the given customer ID with the Adobe Experience Cloud ID Service.
    static void
    Updates the given customer IDs with the Adobe Experience Cloud ID Service.
    static void
    syncIdentifiers(Map<String,String> identifiers, com.adobe.marketing.mobile.VisitorID.AuthenticationState authenticationState)
    Updates the given customer IDs with the Adobe Experience Cloud ID Service.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • EXTENSION

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

    • extensionVersion

      public static String extensionVersion()
      Returns the version of the Identity extension
      Returns:
      The version as String
    • syncIdentifiers

      public static void syncIdentifiers(@NonNull Map<String,String> identifiers)
      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 ignored
      authenticationState - VisitorIDAuthenticationState value 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 - String containing identifier type; should not be null or empty
      identifier - String containing identifier value; should not be null or empty
      authenticationState - VisitorIDAuthenticationState value 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 String returned in the AdobeCallback:

      • The adobe_mc attribute 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_vid attribute is the URL encoded Analytics Custom Visitor ID, if available from Analytics.
      Parameters:
      baseURL - String URL to which the visitor info needs to be appended
      callback - AdobeCallback invoked with the updated URL String; when an AdobeCallbackWithError is provided, an AdobeError can be returned in the eventuality of an unexpected error or if the default timeout (500ms) is met before the Identity URL variables are retrieved
    • 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 String containing Visitor ID Service URL variables. There will be no leading & or ? punctuation, as the caller is responsible for placing it in their resulting URI in the correct location.

      If an error occurs while retrieving the URL string, callback will be called with null. Otherwise, the following information is added to the String returned in the AdobeCallback:

      • The adobe_mc attribute 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_vid attribute is the URL encoded Analytics Custom Visitor ID, if available from Analytics.
      Parameters:
      callback - AdobeCallback which will be called containing Visitor ID Service URL parameters; when an AdobeCallbackWithError is provided, an AdobeError can be returned in the eventuality of an unexpected error or if the default timeout (500ms) is met before the Identity URL variables are retrieved
    • 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 - AdobeCallback invoked with the list of VisitorID objects; when an AdobeCallbackWithError is provided, an AdobeError can 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 - AdobeCallback invoked with the ECID String; when an AdobeCallbackWithError is provided, an AdobeError can be returned in the eventuality of an unexpected error or if the default timeout (500ms) is met before the ECID is retrieved