Stay organized with collections
Save and categorize content based on your preferences.
DownloadProgressListener
open class DownloadProgressListener
A optional listener class used by download clients to track progress. Apps should extend this class and pass an instance into MbmsDownloadSession.download(DownloadRequest)
This is optionally specified when requesting a download and will only be called while the app is running.
Summary
Public methods |
open Unit |
Called when the middleware wants to report progress for a file in a DownloadRequest .
|
Public constructors
DownloadProgressListener
DownloadProgressListener()
Public methods
onProgressUpdated
open fun onProgressUpdated(
request: DownloadRequest!,
fileInfo: FileInfo!,
currentDownloadSize: Int,
fullDownloadSize: Int,
currentDecodedSize: Int,
fullDecodedSize: Int
): Unit
Called when the middleware wants to report progress for a file in a DownloadRequest
.
Parameters |
request |
DownloadRequest!: a DownloadRequest , indicating which download is being referenced. |
fileInfo |
FileInfo!: a FileInfo specifying the file to report progress on. Note that the request may result in many files being downloaded and the client may not have been able to get a list of them in advance. |
currentDownloadSize |
Int: is the current amount downloaded. |
fullDownloadSize |
Int: is the total number of bytes that make up the downloaded content. This may be different from the decoded final size, but is useful in gauging download progress. |
currentDecodedSize |
Int: is the number of bytes that have been decoded. |
fullDecodedSize |
Int: is the total number of bytes that make up the final decoded content. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 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-02-10 UTC."],[],[],null,["# DownloadProgressListener\n\nAdded in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nDownloadProgressListener\n========================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/telephony/mbms/DownloadProgressListener \"View this page in Java\") \n\n```\nopen class DownloadProgressListener\n```\n\n|---|------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.telephony.mbms.DownloadProgressListener](#) |\n\nA optional listener class used by download clients to track progress. Apps should extend this class and pass an instance into [MbmsDownloadSession.download(DownloadRequest)](../MbmsDownloadSession.html#download(android.telephony.mbms.DownloadRequest)) This is optionally specified when requesting a download and will only be called while the app is running.\n\nSummary\n-------\n\n| Public constructors ||\n|--------------------------------------------------------------------|---|\n| [DownloadProgressListener](#DownloadProgressListener())`()` \u003cbr /\u003e |\n\n| Public methods ||\n|-----------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | [onProgressUpdated](#onProgressUpdated(android.telephony.mbms.DownloadRequest,%20android.telephony.mbms.FileInfo,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int,%20kotlin.Int))`(`request:` `[DownloadRequest](/reference/kotlin/android/telephony/mbms/DownloadRequest)!`, `fileInfo:` `[FileInfo](/reference/kotlin/android/telephony/mbms/FileInfo)!`, `currentDownloadSize:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `fullDownloadSize:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `currentDecodedSize:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`, `fullDecodedSize:` `[Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`)` Called when the middleware wants to report progress for a file in a [DownloadRequest](/reference/kotlin/android/telephony/mbms/DownloadRequest). |\n\nPublic constructors\n-------------------\n\n### DownloadProgressListener\n\n```\nDownloadProgressListener()\n```\n\nPublic methods\n--------------\n\n### onProgressUpdated\n\nAdded in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun onProgressUpdated(\n request: DownloadRequest!, \n fileInfo: FileInfo!, \n currentDownloadSize: Int, \n fullDownloadSize: Int, \n currentDecodedSize: Int, \n fullDecodedSize: Int\n): Unit\n```\n\nCalled when the middleware wants to report progress for a file in a [DownloadRequest](/reference/kotlin/android/telephony/mbms/DownloadRequest).\n\n| Parameters ||\n|-----------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `request` | [DownloadRequest](/reference/kotlin/android/telephony/mbms/DownloadRequest)!: a [DownloadRequest](/reference/kotlin/android/telephony/mbms/DownloadRequest), indicating which download is being referenced. |\n| `fileInfo` | [FileInfo](/reference/kotlin/android/telephony/mbms/FileInfo)!: a [FileInfo](/reference/kotlin/android/telephony/mbms/FileInfo) specifying the file to report progress on. Note that the request may result in many files being downloaded and the client may not have been able to get a list of them in advance. |\n| `currentDownloadSize` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): is the current amount downloaded. |\n| `fullDownloadSize` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): is the total number of bytes that make up the downloaded content. This may be different from the decoded final size, but is useful in gauging download progress. |\n| `currentDecodedSize` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): is the number of bytes that have been decoded. |\n| `fullDecodedSize` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): is the total number of bytes that make up the final decoded content. |"]]