-
public interface UserApiThe public API that is used to set user information.
-
-
Method Summary
Modifier and Type Method Description abstract UnitsetUserIdentifier(String userId)Sets the user ID. abstract UnitclearUserIdentifier()Clears the currently set user ID. abstract UnitsetUserEmail(String email)Sets the current user's email address. abstract UnitclearUserEmail()Clears the currently set user's email address. abstract UnitaddUserPersona(String persona)Adds a custom user persona. abstract UnitclearUserPersona(String persona)Clears the custom user persona, if it is set. abstract UnitclearAllUserPersonas()Clears all custom user personas from the user. abstract UnitsetUsername(String username)Sets the username of the currently logged in user. abstract UnitclearUsername()Clears the username of the currently logged in user, for example if the user has logged out. -
-
Method Detail
-
setUserIdentifier
abstract Unit setUserIdentifier(String userId)
Sets the user ID. This would typically be some form of unique identifier such as a UUID or database key for the user. This ID will persist across app launches until it is explicitly removed using clearUserIdentifier or otherwise cleared. Do not put personal identifying information such as email addresses in this field.
- Parameters:
userId- the unique identifier for the user
-
clearUserIdentifier
abstract Unit clearUserIdentifier()
Clears the currently set user ID. For example, if the user logs out.
-
setUserEmail
@Deprecated(message = Use discouraged. Personal identifying information shouldn't be stored in telemetry.) abstract Unit setUserEmail(String email)
Sets the current user's email address.
- Parameters:
email- the email address of the current user
-
clearUserEmail
@Deprecated(message = Use discouraged. Personal identifying information shouldn't be stored in telemetry.) abstract Unit clearUserEmail()
Clears the currently set user's email address.
-
addUserPersona
abstract Unit addUserPersona(String persona)
Adds a custom user persona. A persona is a trait associated with a given user. A maximum of 10 personas can be set.
- Parameters:
persona- the persona to set
-
clearUserPersona
abstract Unit clearUserPersona(String persona)
Clears the custom user persona, if it is set.
- Parameters:
persona- the persona to clear
-
clearAllUserPersonas
abstract Unit clearAllUserPersonas()
Clears all custom user personas from the user.
-
setUsername
@Deprecated(message = Use discouraged. Personal identifying information shouldn't be stored in telemetry.) abstract Unit setUsername(String username)
Sets the username of the currently logged in user.
- Parameters:
username- the username to set
-
clearUsername
@Deprecated(message = Use discouraged. Personal identifying information shouldn't be stored in telemetry.) abstract Unit clearUsername()
Clears the username of the currently logged in user, for example if the user has logged out.
-
-
-
-