Set/Update User Profile Data

Update user profile#

To update your profile call the below method.

ContactManager.updateMyProfile(PROFILE_OBJECT,(isSuccess, throwable, data) -> {
if (isSuccess) {
//Profile Updated. Update the UI
} else {
//Profile update failed print throwable to find the exception details
}
});
info

In profile object for image property set the absolute file path of a file if a image file needs to be uploaded or else set it to profile image id.

Refer this doc to know more about Profile Class

ArgumentDescriptionData type
PROFILE_OBJECTProfileProfile object which the updated value
CALLBACKFlyCallbackFlyCallback implemented as as lambda expression

Update user profile image#

To update your profile image, please use the following method. You can either send a file object containing the new image or provide a remote URL pointing to the image file

ContactManager.updateMyProfileImage(PROFILE_IMAGE_FILE,(isSuccess, throwable, data) -> {
if (isSuccess) {
Profile myProfile = (Profile) data.get("data");
//Profile image Updated. Update the UI
} else {
//Profile image update failed print throwable to find the exception details
}
},IMAGE_URL);
ArgumentTypeDescription
PROFILE_IMAGE_FILEFilefile object of the profile image optional
CALLBACKFlyCallbackFlyCallback implemented as lambda expression
IMAGE_URLStringURL of the profile image optional

Refer Profile to know more about Profile class.

Remove user profile image#

To remove your profile image call the below method.

ContactManager.removeProfileImage((isSuccess, throwable, data) -> {
if (isSuccess) {
//Profile image removed. Update the UI
} else {
//Removing profile image failed print throwable to find the exception details
}
});
ArgumentTypeDescription
CALLBACKFlyCallbackFlyCallback implemented as lambda expression

Set User status#

User can set the status for their profile using the below method.

FlyCore.setMyProfileStatus(STATUS_TEXT,(isSuccess, throwable, data) -> {
if (isSuccess) {
// Status Set
} else {
}
});
ArgumentTypeDescription
STATUS_TEXTStringStatus text cannot be longer than 140 characters
CALLBACKFlyCallbackFlyCallback implemented as lambda expression

Delete User status#

User can delete their user status by calling the below method.

FlyCore.deleteProfileStatus(USER_STATUS);
ArgumentTypeDescription
USER_STATUSProfileStatusObject of the profile status that has to be deleted
caution

User cannot delete a status which is currently selected.

Enable/Disable User Busy status#

User can enable and disable their busy status using the below method.

FlyCore.enableDisableBusyStatus(ENABLE_BUSY_STATUS,(isSuccess, throwable, data)->{
if (isSuccess) {
// busy status enable/disabled updated successfully
} else {
// updation failed print throwable for more info
}
});
ArgumentTypeDescription
ENABLE_BUSY_STATUSbooleantrue enables busy status and false disables busy status

Set User Busy status#

User can set the busy status message for their one to one chat conversation using the below method.

FlyCore.setMyBusyStatus(BUSY_STATUS_TEXT,(isSuccess, throwable, data) -> {
if(isSuccess){
// Busy status message updated successfully
}else{
// updation failed print throwable for more info
}
});
ArgumentTypeDescription
BUSY_STATUS_TEXTStringbusy status text cannot be longer than 140 characters

Get User Busy settings status#

User can get their busy settings status by calling the below method.

FlyCore.getBusySettingsStatusFromServer();

Delete User Busy status#

User can delete their busy status by calling the below method.

FlyCore.deleteBusyStatus(USER_BUSY_STATUS);
ArgumentTypeDescription
USER_BUSY_STATUSBusyStatusObject of the user busy status that has to be deleted
caution

User cannot delete a busy status which is currently selected.