public class Attribute
extends java.lang.Object
Attribute is a property of the user profile. You can use predefined profiles (e.g. name, gender, etc.) or create your own.
AppMetrica allows you to create up to 100 custom attributes.
Attributes are applied by using theUserProfile.Builder.apply(UserProfileUpdate) method.| Constructor and Description |
|---|
Attribute() |
| Modifier and Type | Method and Description |
|---|---|
static BirthDateAttribute |
birthDate()
Creates a birth date attribute.
|
static BooleanAttribute |
customBoolean(java.lang.String key)
Creates a custom boolean attribute.
|
static CounterAttribute |
customCounter(java.lang.String key)
Creates a custom counter attribute.
|
static NumberAttribute |
customNumber(java.lang.String key)
Creates a custom number attribute.
|
static StringAttribute |
customString(java.lang.String key)
Creates a custom string attribute.
|
static GenderAttribute |
gender()
Creates a gender attribute.
|
static NameAttribute |
name()
Creates a name attribute.
|
static NotificationsEnabledAttribute |
notificationsEnabled()
Creates a NotificationsEnabled attribute.
|
@NonNull public static StringAttribute customString(@NonNull java.lang.String key)
key - Attribute key. It can contain up to 200 charactersStringAttribute object@NonNull public static NumberAttribute customNumber(@NonNull java.lang.String key)
key - Attribute key. It can contain up to 200 charactersNumberAttribute object@NonNull public static BooleanAttribute customBoolean(@NonNull java.lang.String key)
key - Attribute key. It can contain up to 200 charactersBooleanAttribute object@NonNull public static CounterAttribute customCounter(@NonNull java.lang.String key)
key - Attribute key. It can contain up to 200 charactersCounterAttribute object@NonNull public static GenderAttribute gender()
GenderAttribute object@NonNull public static BirthDateAttribute birthDate()
BirthDateAttribute object@NonNull public static NotificationsEnabledAttribute notificationsEnabled()
NotificationsEnabledAttribute object@NonNull public static NameAttribute name()
NameAttribute object