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.
val localPresenceUpdated: Observable<Presence>
Emits when the Presence of the local user gets updated. |
|
val remotePresenceUpdated: Observable<Presence>
Emits when the Presence of a remote user gets updated. |
fun getOwnPresence(): Single<Presence>
Fetches the presence for the current user. |
|
fun getPresenceForContact(contact: Contact): Maybe<Presence>
Fetches the presence for the specified contact. |
|
fun getPresences(withoutAvatar: Boolean): Single<List<Presence>>
Fetches all the presences to which the current user is subscribed. |
|
fun subscribeToPresence(contact: Contact): Maybe<Presence>
Subscribes to the presence of the specified contact. |
|
fun subscribeToPresences(contacts: List<Contact>): Single<List<Presence>>
Subscribes to the presence of each contact included in contacts. |
|
fun updateOwnPresence(presence: Presence): Single<Presence>
Updates the presence for the current user. |