Presences

class Presences

The presence service.

This class allows performing presence related actions like obtaining the local user presence or subscribing to the presence of one or more contacts. It also allows adding a listener to receive presence events (@see PresencesListener).

Properties

Link copied to clipboard

Access to the reactive API of the service.

Functions

Link copied to clipboard

Adds a listener to receive presence events.

Link copied to clipboard

Fetches the presence for the current user.

Link copied to clipboard

Fetches the presence for the specified contact.

Link copied to clipboard
fun getPresences(withoutAvatar: Boolean, onCompletion: (Either<List<Presence>, SippoResourceError>) -> Unit)

Fetches all the presences to which the current user is subscribed.

Link copied to clipboard

Removes the specified listener.

Link copied to clipboard

Subscribes to the presence for the current user.

Link copied to clipboard
fun subscribeToPresence(contact: Contact, onCompletion: (Either<Presence?, SippoResourceError>) -> Unit)

Subscribes to the presence of the specified contact.

Link copied to clipboard
fun subscribeToPresenceBy(userUri: String, onCompletion: (Either<Presence?, SippoResourceError>) -> Unit)

Subscribes to the presence of the specified userUri.

Link copied to clipboard

Subscribes to the presence of each contact included in contacts.

Link copied to clipboard

Subscribes to the presence of each contact included in userUris.

Link copied to clipboard
fun updateOwnAvatar(avatar: String, onCompletion: (Either<Presence, SippoResourceError>) -> Unit)

Updates the current user avatar.

Link copied to clipboard
fun updateOwnDisplayName(displayName: String, onCompletion: (Either<Presence, SippoResourceError>) -> Unit)

Updates the current user displayName.

Link copied to clipboard
fun updateOwnMood(mood: String, onCompletion: (Either<Presence, SippoResourceError>) -> Unit)

Updates the current user mood.

Link copied to clipboard
fun updateOwnPresence(presence: Presence, onCompletion: (Either<Presence, SippoResourceError>) -> Unit)

Updates the presence for the current user.

Link copied to clipboard

Updates the current user state.