Class UserProfile


  • public class UserProfile
    extends Object
    • 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 UserProfile 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.
      • updateUserAttributes

        public static void updateUserAttributes​(@NonNull
                                                Map<String,​Object> attributeMap)
        UserProfile API to set user profile attributes keys and values.

        If the attribute does not exist, it will be created. If the attribute already exists, then the value will be updated. A null attribute value will remove the attribute.

        This API will generate a userprofile request event.

        Parameters:
        attributeMap - HashMap of profile attributes key-value pairs to be set.
      • updateUserAttribute

        @Deprecated
        public static void updateUserAttribute​(@NonNull
                                               String attributeName,
                                               @Nullable
                                               Object attributeValue)
        Deprecated.
        UserProfile API to set user profile attributes keys and values.

        If the attribute does not exist, it will be created. If the attribute already exists, then the value will be updated. A null attribute value will remove the attribute.

        This API will generate a userprofile request event.

        Parameters:
        attributeName - Attribute key.
        attributeValue - Attribute value corresponding to the key. Java primitive types, Maps and Lists are supported.
      • removeUserAttribute

        @Deprecated
        public static void removeUserAttribute​(@NonNull
                                               String attributeName)
        Deprecated.
        UserProfile API to remove the given attribute name.

        If the attribute does not exist, this API has no effects. If the attribute exists, then the User Attribute will be removed

        Parameters:
        attributeName - A String attribute key which has to be removed.
      • removeUserAttributes

        public static void removeUserAttributes​(@NonNull
                                                List<String> attributeNames)
        UserProfile API to remove attributes.

        If the attribute does not exist, this API has no effects. If the attribute exists, then the User Attribute will be removed

        Parameters:
        attributeNames - A List of attribute keys which have to be removed.
      • getUserAttributes

        public static void getUserAttributes​(@NonNull
                                             List<String> keys,
                                             @NonNull
                                             com.adobe.marketing.mobile.AdobeCallback<Map<String,​Object>> callback)
        UserProfile API to get attributes with provided keys.
        Parameters:
        keys - Attribute key.
        callback - An AdobeCallback invoked after profile attributes retrieved from memory