State

interface State

Properties

Link copied to clipboard
abstract val anonymousId: String?
Link copied to clipboard
abstract var apiKey: String?
Link copied to clipboard
abstract var email: String?
Link copied to clipboard
abstract var externalId: String?
Link copied to clipboard
abstract var phoneNumber: String?
Link copied to clipboard
abstract var pushState: String?
Link copied to clipboard
abstract var pushToken: String?

Functions

Link copied to clipboard
abstract fun getAsProfile(withAttributes: Boolean = false): Profile

Get all user data in state as a Profile model object

Link copied to clipboard
abstract fun offStateChange(observer: StateObserver)

De-register an observer from onStateChange

Link copied to clipboard
abstract fun onStateChange(observer: StateObserver)

Register an observer to be notified when state changes

Link copied to clipboard
abstract fun reset()

Remove all user identifiers and attributes from internal state

Link copied to clipboard
abstract fun resetAttributes()

Clear user's attributes from internal state, leaving profile identifiers intact

Link copied to clipboard
abstract fun setAttribute(key: ProfileKey, value: Serializable)

Set an individual attribute

Link copied to clipboard
abstract fun setProfile(profile: Profile)

Update user state from a new Profile model object