Profile Image

Profile Image#

The Mirrorfly SDK provides a profileImage in the Profile class, which includes an image token that can be used to load the image in your view. Before loading the image, you need to append the image endpoint. The SDK offers an open function called getImageUrl(), which allows you to obtain the image endpoint URL. After obtaining the endpoint URL, you can append the image token to it and then load the image. Users can retrieve the image endpoint by calling the method below.

ChatManager.getImageUrl();

Profile Image Token#

The token is typically required for load the network image in the view. To get the token, you can use the following method:

FlyUtils.decodedToken();
If you encounter any token-related error while loading the profile image, refresh the token by calling the following method. Then, retrieve the token by calling the `FlyUtils.decodedToken()` method.
FlyCore.refreshAndGetAuthToken((isSuccess, throwable, data) -> {
});