Chat SDK for Unity and Windows v1.3.0
|
Public Member Functions | |
void | PublishPresence (string description, CallBack callback=null) |
void | SubscribePresences (List< string > members, long expiry, ValueCallBack< List< Presence > > callback=null) |
void | UnsubscribePresences (List< string > members, CallBack callback=null) |
void | FetchSubscribedMembers (int pageNum, int pageSize, ValueCallBack< List< string > > callback=null) |
void | FetchPresenceStatus (List< string > members, ValueCallBack< List< Presence > > callback=null) |
void | AddPresenceManagerDelegate (IPresenceManagerDelegate presenceManagerDelegate) |
void | RemovePresenceManagerDelegate (IPresenceManagerDelegate presenceManagerDelegate) |
The presence manager class that defines methods of managing the presence state.
void AgoraChat.PresenceManager.PublishPresence | ( | string | description, |
CallBack | callback = null |
||
) |
Publishes a custom presence state.
ext | The description information of the presence state. It can be an empty string. |
callBack | The result callback which contains the error message if this method fails. |
void AgoraChat.PresenceManager.SubscribePresences | ( | List< string > | members, |
long | expiry, | ||
ValueCallBack< List< Presence > > | callback = null |
||
) |
Subscribes to a user's presence state. If the subscription succeeds, the subscriber will receive the onPresenceUpdated callback when the user's presence state changes.
members | The array of user IDs whose presence states you want to subscribe to. |
expiry | The subscription duration in seconds. The duration cannot exceed 2,592,000 (30×24×3600) seconds, i.e., 30 days. |
callBack | The result callback which contains the error message if the method fails. Returns the current presence state of subscribed users if this method executes successfully. |
void AgoraChat.PresenceManager.UnsubscribePresences | ( | List< string > | members, |
CallBack | callback = null |
||
) |
Unsubscribes from the presence state of the unspecified users.
members | The array of user IDs whose presence state you want to unsubscribe from. |
callBack | The result callback, which contains the error message if the method fails. |
void AgoraChat.PresenceManager.FetchSubscribedMembers | ( | int | pageNum, |
int | pageSize, | ||
ValueCallBack< List< string > > | callback = null |
||
) |
Uses pagination to get the list of users whose presence state you have subscribed to.
pageNum | The current page number, starting from 1. |
pageSize | The number of subscribed users displayed on each page. |
callBack | The result callback, which contains user IDs whose presence state you have subscribed to. Returns an empty list if you do not subscribe to any user's presence state. |
void AgoraChat.PresenceManager.FetchPresenceStatus | ( | List< string > | members, |
ValueCallBack< List< Presence > > | callback = null |
||
) |
Gets the current presence state of the specified users.
members | The array of user IDs whose current presence state you want to get. |
callBack | The result callback, which contains the current presence state of users you have subscribed to. |
void AgoraChat.PresenceManager.AddPresenceManagerDelegate | ( | IPresenceManagerDelegate | presenceManagerDelegate | ) |
Adds a presence state listener.
listener | IPresenceManagerDelegate The presence state listener to add. |
void AgoraChat.PresenceManager.RemovePresenceManagerDelegate | ( | IPresenceManagerDelegate | presenceManagerDelegate | ) |
Removes a presence listener.
listener | IPresenceManagerDelegate The presence state listener to remove. |