fetch Base64File
Fetches a file from the given URL and returns its contents as a base64-encoded string.
This is typically used to download a file that was previously uploaded via uploadBase64File. The URL is the one returned by that upload method. The raw response bytes are read in full and encoded to a Base64 string.
The operation is asynchronous. The listener callbacks are invoked on the main thread.
Code Example:
meeting.fetchBase64File(fileUrl, token,
object : TaskCompletionListener<String, String> {
override fun onComplete(base64Data: String) {
Log.d("Meeting", "File fetched, length: " + base64Data.length)
}
override fun onError(error: String) {
Log.e("Meeting", "Fetch error: " + error)
}
})
Content copied to clipboard
Parameters
url
the URL of the file to fetch (typically a URL returned by uploadBase64File)
token
the VideoSDK authentication token (same token used for config)
listener
the TaskCompletionListener to receive the base64-encoded file content on success, or an error message on failure