Public Member Functions | |
| void | addUserInfoManagerListener (EMUserInfoManagerListener listener) |
| void | removeUserInfoManagerListener (EMUserInfoManagerListener listener) |
| void | updateOwnInfo (final EMUserInfo userInfo, final EMValueCallBack< String > callBack) |
| void | updateOwnInfoByAttribute (final EMUserInfoType attribute, final String value, final EMValueCallBack< String > callBack) |
| void | fetchUserInfoByUserId (final String[] userIds, final EMValueCallBack< Map< String, EMUserInfo > > callBack) |
| void | fetchUserInfoByAttribute (final String[] userIds, final EMUserInfoType[] attributes, EMValueCallBack< Map< String, EMUserInfo > > callBack) |
| void | subscribeUsersInfo (final String[] userIds, final EMCallBack callback) |
| void | unsubscribeUsersInfo (final String[] userIds, final EMCallBack callback) |
| void | fetchSubscribedUsers (final EMValueCallBack< List< EMUserInfo > > callback) |
| EMUserInfo | getUserInfoWithUserId (String userId) throws HyphenateException |
| void | getUserInfoWithUserIds (String[] userIds, final EMValueCallBack< Map< String, EMUserInfo > > callback) |
The user attribute manager for updating and getting user attributes.
| void com.hyphenate.chat.EMUserInfoManager.addUserInfoManagerListener | ( | EMUserInfoManagerListener | listener | ) |
Adds a listener for user attribute updates.
| listener | The listener to add. |
| void com.hyphenate.chat.EMUserInfoManager.fetchSubscribedUsers | ( | final EMValueCallBack< List< EMUserInfo > > | callback | ) |
Gets user attributes of strangers whose attribute update events are subscribed to.
| callback | The result callback:
|
| void com.hyphenate.chat.EMUserInfoManager.fetchUserInfoByAttribute | ( | final String[] | userIds, |
| final EMUserInfoType[] | attributes, | ||
| EMValueCallBack< Map< String, EMUserInfo > > | callBack ) |
Gets any single or multiple attributes of one or more users.
| userIds | The user ID array. |
| attributes | The user attributes. |
| callBack | The result callback which contains the error information if the method fails. See EMCallBack. |
| void com.hyphenate.chat.EMUserInfoManager.fetchUserInfoByUserId | ( | final String[] | userIds, |
| final EMValueCallBack< Map< String, EMUserInfo > > | callBack ) |
Gets user attributes by user ID.
| userIds | The user ID array. |
| callBack | The result callback which contains the error information if the method fails. See EMCallBack. |
| EMUserInfo com.hyphenate.chat.EMUserInfoManager.getUserInfoWithUserId | ( | String | userId | ) | throws HyphenateException |
Gets the user attributes of a user from the local memory.
This method retrieves user attributes from the local memory without making network requests.
This is a synchronous method and blocks the current thread.
| userId | The user ID. |
null if the user does not exist in the local memory. | HyphenateException | Thrown if the method call fails. The exception contains an error code and description. For details, see EMError. |
| void com.hyphenate.chat.EMUserInfoManager.getUserInfoWithUserIds | ( | String[] | userIds, |
| final EMValueCallBack< Map< String, EMUserInfo > > | callback ) |
Gets user attributes by user ID from the local memory.
This method retrieves user attributes from the local memory without making network requests.
| userIds | The user ID array. |
| callback | The result callback:
|
| void com.hyphenate.chat.EMUserInfoManager.removeUserInfoManagerListener | ( | EMUserInfoManagerListener | listener | ) |
Removes a listener for user attribute updates.
| listener | The listener to remove. |
| void com.hyphenate.chat.EMUserInfoManager.subscribeUsersInfo | ( | final String[] | userIds, |
| final EMCallBack | callback ) |
Subscribes to user attribute update events of strangers by user ID.
| userIds | The array of user IDs to subscribe to. |
| callback | The result callback which contains the error information if the method fails. See EMCallBack. |
| void com.hyphenate.chat.EMUserInfoManager.unsubscribeUsersInfo | ( | final String[] | userIds, |
| final EMCallBack | callback ) |
Unsubscribes from user attribute update events of strangers by user ID.
| userIds | The array of user IDs to unsubscribe from. |
| callback | The completion callback which contains the error message if the method fails. |
| void com.hyphenate.chat.EMUserInfoManager.updateOwnInfo | ( | final EMUserInfo | userInfo, |
| final EMValueCallBack< String > | callBack ) |
Modifies the user attributes of the current user.
| userInfo | The user attributes to be modified. |
| callBack | The result callback which contains the error information if the method fails. See EMCallBack. |
| void com.hyphenate.chat.EMUserInfoManager.updateOwnInfoByAttribute | ( | final EMUserInfoType | attribute, |
| final String | value, | ||
| final EMValueCallBack< String > | callBack ) |
Modifies attributes of the current user.
| attribute | The user attribute. |
| value | The modified user attribute (if this parameter is set as null, the attribute field will be removed on the server). |
| callBack | The result callback which contains the error information if the method fails. See EMCallBack. |