on Glide Prepare Load
public abstract void onGlidePrepareLoad(String url, Map<String, String> headers, ChatUIMediaInterceptor.Callback<Map<String, String>> callback)
Called before Glide loads an image, allowing custom HTTP headers to be injected.
Use cases:
- Large image preview screen (
PicturePagerActivity) - Default avatar loading in GlideChatUIImageEngine (
loadConversationListPortrait,loadConversationPortrait)
Note: This callback runs on the main thread — do not perform blocking operations. Switch to a background thread if heavy work is needed.
Note: You must call callback.onComplete(headers) to return the headers; the SDK will not proceed with image loading until the callback is invoked.
Parameters
url
image URL
headers
HTTP headers already set for this request
callback
invoke onComplete(headers) to pass the (possibly modified) headers back