Set/Update User Profile Data

Update user profile#

To update your profile call the below method.

Mirrorfly.updateMyProfile(
name: NAME,
email: EMAIL_ID,
mobile: MOBILE_NUMBER,
status: STATUS,
image: IMAGE_URL,
flyCallback: (FlyResponse response){
if (response.isSuccess) {
//Profile Updated. Update the UI
} else {
//Profile update failed print throwable to find the exception details
}
});
ArgumentTypeDescription
NAMEStringname of the user
EMAIL_IDStringemail id of the user
MOBILE_NUMBERStringmobile number of the user
STATUSStringstatus of the user
IMAGE_URLStringimage url of the user
flyCallbackFlyResponsecallback to observe the action status

Update user profile image#

To update your profile image, please use the following method. You can send a file path containing the new image file

Mirrorfly.updateMyProfileImage(image: IMAGE_FILE_PATH,flyCallback: (FlyResponse response){
if (response.isSuccess) {
//Profile image Updated. Update the UI
} else {
//Profile image update failed print throwable to find the exception details
}
});
ArgumentTypeDescription
IMAGE_FILE_PATHStringfile path string of the profile image
flyCallbackFlyResponsecallback to observe the action status

Refer Profile to know more about Profile class.

Remove user profile image#

To remove your profile image call the below method.

Mirrorfly.removeProfileImage(flyCallBack: (FlyResponse response){
if (isSuccess) {
//Profile image removed. Update the UI
} else {
//Removing profile image failed print throwable to find the exception details
}
});
ArgumentTypeDescription
flyCallbackFlyResponsecallback to observe the action status

Set User status#

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

Mirrorfly.setMyProfileStatus(status: STATUS_TEXT, statusId: STATUS_ID,flyCallBack: (FlyResponse response){
if (response.isSuccess) {
// Status Set
} else {
}
});
ArgumentTypeDescription
STATUS_TEXTStringStatus text cannot be longer than 140 characters
STATUS_IDStringid of the Status
flyCallbackFlyResponsecallback to observe the action status

Delete User status#

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

await Mirrorfly.deleteProfileStatus(id: STATUS_ID, status: STATUS_TEXT, isCurrentStatus: IS_CURRENT_STATUS)
ArgumentTypeDescription
STATUS_TEXTStringStatus text
STATUS_IDStringid of the Status
IS_CURRENT_STATUSboolis the status currently set in profile
caution

User cannot delete a status which is currently selected.