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

Link copied to clipboard

Emits when the Presence of the local user gets updated.

Link copied to clipboard

Emits when the Presence of a remote user gets updated.

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

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 updateOwnAvatar(avatar: String): Single<Presence>

Updates the current user avatar.

Link copied to clipboard
fun updateOwnDisplayName(displayName: String): Single<Presence>

Updates the current user displayName.

Link copied to clipboard
fun updateOwnMood(mood: String): Single<Presence>

Updates the current user mood.

Link copied to clipboard

Updates the presence for the current user.

Link copied to clipboard

Updates the current user state.