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).
Functions
Link copied to clipboard
Adds a listener to receive presence events.
Link copied to clipboard
fun getOwnPresence(onCompletion: (Either<Presence, SippoResourceError>) -> Unit)
Content copied to clipboard
Fetches the presence for the current user.
Link copied to clipboard
fun getPresenceForContact(contact: Contact, onCompletion: (Either<Presence?, SippoResourceError>) -> Unit)
Content copied to clipboard
Fetches the presence for the specified contact.
Link copied to clipboard
fun getPresences(withoutAvatar: Boolean, onCompletion: (Either<List<Presence>, SippoResourceError>) -> Unit)
Content copied to clipboard
Fetches all the presences to which the current user is subscribed.
Link copied to clipboard
Removes the specified listener.
Link copied to clipboard
fun subscribeToOwnPresence(onCompletion: (Either<Presence, SippoResourceError>) -> Unit)
Content copied to clipboard
Subscribes to the presence for the current user.
Link copied to clipboard
fun subscribeToPresence(contact: Contact, onCompletion: (Either<Presence?, SippoResourceError>) -> Unit)
Content copied to clipboard
Subscribes to the presence of the specified contact.
Link copied to clipboard
fun subscribeToPresences(contacts: List<Contact>, onCompletion: (Either<List<Presence>, SippoResourceError>) -> Unit)
Content copied to clipboard
Subscribes to the presence of each contact included in contacts.
Link copied to clipboard
fun updateOwnPresence(presence: Presence, onCompletion: (Either<Presence, SippoResourceError>) -> Unit)
Content copied to clipboard
Updates the presence for the current user.