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.

Functions

Link copied to clipboard
fun getOwnPresence(): Single<Presence>

Fetches the presence for the current user.

Link copied to clipboard
fun getPresenceForContact(contact: Contact): Maybe<Presence>

Fetches the presence for the specified contact.

Link copied to clipboard
fun getPresences(withoutAvatar: Boolean): Single<List<Presence>>

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

Link copied to clipboard
fun subscribeToOwnPresence(): Single<Presence>

Subscribes to the presence for the current user.

Link copied to clipboard
fun subscribeToPresence(contact: Contact): Maybe<Presence>

Subscribes to the presence of the specified contact.

Link copied to clipboard
fun subscribeToPresenceBy(userUri: String): Maybe<Presence>

Subscribes to the presence of the specified userUri.

Link copied to clipboard
fun subscribeToPresences(contacts: List<Contact>): Single<List<Presence>>

Subscribes to the presence of each contact included in contacts.

Link copied to clipboard
fun subscribeToPresencesBy(userUris: List<String>): Single<List<Presence>>

Subscribes to the presence of each contact included in userUris.

Link copied to clipboard
fun updateOwnPresence(presence: Presence): Single<Presence>

Updates the presence for the current user.

Properties

Link copied to clipboard
val localPresenceUpdated: Observable<Presence>

Emits when the Presence of the local user gets updated.

Link copied to clipboard
val remotePresenceUpdated: Observable<Presence>

Emits when the Presence of a remote user gets updated.