Retrieve User Profile Data

Get user profile data#

To get the profile data of a user(not a group) call the below method.

ContactManager.getUserProfile(USER_JID,FETCH_FROM_SERVER,(isSuccess, throwable, data) -> {
if (success){
val profileData = (ProfileDetails) data["data"]
}else {
// get profile failed print throwable to find the details
}
});

Refer this doc to know more about Profile Class

ArgumentTypeDescription
USER_JIDStringJid of the user
FETCH_FROM_SERVERbooleantrue to fetch from server
CALLBACKFlyCallbackFlyCallback implemented as as lambda expression

All the contact related operation will be found below.

Get User/Group profile details#

if you want to get the profile details for the chat user, you can utilise the below method.

ProfileDetails profileDetails = ContactManager.getProfileDetails(JID);
ArgumentTypeDescription
JIDStringjid of the user

Get current user status#

User can get their current user status using the below method.

ProfileStatus myUserStatus = FlyCore.getMyProfileStatus();

Refer this doc to know more about ProfileStatus Class

Get the list of user saved profile statuses#

User can get their list of previously saved user statuses by calling the below method.

List<ProfileStatus> myStatusList = FlyCore.getProfileStatusList();
info

This list contains some pre defined values.