DownloadRegionsStatusListener (API Reference)
Interface DownloadRegionsStatusListener
Interface to get notified on status updates when downloading map regions.
-
Method Summary
Modifier and TypeMethodDescriptionvoidonDownloadRegionsComplete(MapLoaderError error, List<RegionId> regions) Called after the download for all requested regions has been completed with success or failure.voidonPause(MapLoaderError error) Called when download is paused.voidonProgress(RegionId region, int percentage) Called multiple times to indicate the download progress for each requested region individually.voidonResume()Called when paused download is resumed.
-
Method Details
-
onDownloadRegionsComplete
Called after the download for all requested regions has been completed with success or failure. In this callback, failure represents non-retryable error (eg. authentication failure because of invalid credentials and similars). Temporary failures (eg. network errors) are notified through
onPause(com.here.sdk.maploader.MapLoaderError)and downloads will be in paused state so they can be resumed later. Invoked on the main thread.- Parameters:
error-Represents an error in case of a failure. It is
nullfor an operation that succeeds.regions-Represents a list of regions which has been downloaded. It is
nullin case of an error.
-
onProgress
Called multiple times to indicate the download progress for each requested region individually. Invoked on the main thread.
- Parameters:
region-Represents an id of region status update is related to.
percentage-Represents a percentage of data which has been downloaded for particular region.
-
onPause
Called when download is paused.
- Parameters:
error-Populated when retryable error is a reason of a pause. It is 'null' when pause is called by the user.
-
onResume
void onResume()Called when paused download is resumed.
-