sippo-sdk / com.quobis.sippo.sipposdk.presence / PresencesRx

PresencesRx

class PresencesRx

Reactive API of Presences.

This class replicates some of the methods included in Presences but using Rx types as return values instead of callbacks. It also exposes the presence events using Rx observables.

Properties

localPresenceUpdated

val localPresenceUpdated: Observable<Presence>

Emits when the Presence of the local user gets updated.

remotePresenceUpdated

val remotePresenceUpdated: Observable<Presence>

Emits when the Presence of a remote user gets updated.

Functions

getOwnPresence

fun getOwnPresence(): Single<Presence>

Fetches the presence for the current user.

getPresenceForContact

fun getPresenceForContact(contact: Contact): Maybe<Presence>

Fetches the presence for the specified contact.

getPresences

fun getPresences(withoutAvatar: Boolean): Single<List<Presence>>

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

subscribeToPresence

fun subscribeToPresence(contact: Contact): Maybe<Presence>

Subscribes to the presence of the specified contact.

subscribeToPresences

fun subscribeToPresences(contacts: List<Contact>): Single<List<Presence>>

Subscribes to the presence of each contact included in contacts.

updateOwnPresence

fun updateOwnPresence(presence: Presence): Single<Presence>

Updates the presence for the current user.