public class UserProfile
extends java.lang.Object
Класс для хранения профиля пользователя.

Профиль пользователя — это набор пользовательских атрибутов. Сведения о профиле пользователя отображаются в отчете о профилях пользователей AppMetrica.

Объект UserProfile должен быть передан на сервер AppMetrica с помощью метода YandexMetrica.reportUserProfile(UserProfile) класса YandexMetrica.

Используйте методы класса Attribute

Вы можете использовать предопределенные и создавать собственные атрибуты.

Профили пользователей хранятся на серверах AppMetrica.

ПРИМЕР:

     
      UserProfile userProfile = new UserProfile.Builder()
                             .apply(Attribute.customString("foo_attribute").withValue("baz_value"))
                             .apply(Attribute.name().withName("John"))
                             .apply(Attribute.gender().withValue(GenderAttribute.Gender.MALE))
                             .apply(Attribute.notificationEnabled().withValue(false))
                             .build();
      YandexMetrica.reportUserProfile(userProfile);
      YandexMetrica.setProfileId("id_1");
     
 

Nested Class Summary

Nested Classes
Modifier and TypeClass and Description
static class UserProfile.Builder
Конструктор создает объект класса UserProfile.

Method Summary

All Methods
Static Methods
Instance Methods
Concrete Methods
Modifier and TypeMethod and Description
java.util.List<UserProfileUpdate<? extends com.yandex.metrica.impl.profile.UserProfileUpdatePatcher>>getUserProfileUpdates() 
static UserProfile.BuildernewBuilder()
Создает объект UserProfile.Builder.

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getUserProfileUpdates

@NonNull
public java.util.List<UserProfileUpdate<? extends com.yandex.metrica.impl.profile.UserProfileUpdatePatcher>> getUserProfileUpdates()

newBuilder

@NonNull
public static UserProfile.Builder newBuilder()
Создает объект UserProfile.Builder.
Returns:
Объект UserProfile.Builder.