Package 

Interface UserApi


  • 
    public interface UserApi
    
                        

    The public API that is used to set user information.

    • 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
      • 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.