DownloadCallback Stay organized with collections
Save and categorize content based on your preferences.
outlined_flag
The DownloadCallback interface provides callback functions for feature downloading.
Methods are available to signal the start, progress, completion, or failure of a feature download.
onDownloadStarted provides the total bytes to download, and onDownloadProgress provides the total bytes downloaded.
onDownloadFailed includes a GenAiException to indicate the cause of the failure.
Callback functions used for feature downloading.
Public Method Summary
void
void
void
onDownloadProgress
(long totalBytesDownloaded) Called when the feature download is in progress.
void
onDownloadStarted
(long bytesToDownload) Called when the feature download started properly.
Public Methods
public void
onDownloadCompleted
()
Called when the feature download is completed.
public void
onDownloadFailed
( GenAiException
e)
Called when the feature download failed.
public void
onDownloadProgress
(long
totalBytesDownloaded)
Called when the feature download is in progress.
public void
onDownloadStarted
(long
bytesToDownload)
Called when the feature download started properly.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-14 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-14 UTC."],[],[]]