Interface DownloadRegionsStatusListener


public interface DownloadRegionsStatusListener

Interface to get notified on status updates when downloading map regions.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called after the download for all requested regions has been completed with success or failure.
    void
    Called when download is paused.
    void
    onProgress(RegionId region, int percentage)
    Called multiple times to indicate the download progress for each requested region individually.
    void
    Called when paused download is resumed.
  • Method Details

    • onDownloadRegionsComplete

      void onDownloadRegionsComplete(@Nullable MapLoaderError error, @Nullable List<RegionId> regions)

      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 null for an operation that succeeds.

      regions -

      Represents a list of regions which has been downloaded. It is null in case of an error.

    • onProgress

      void onProgress(@NonNull RegionId region, int percentage)

      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

      void onPause(@Nullable MapLoaderError error)

      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.