calculateDownloadSize
Calculates the download size for updating the specified regions.
This API is useful to calculate the estimated downloading size for multiple regions. Due to possible shared data between regions, the total download size for multiple regions may be smaller than the sum of individual regions' download sizes. This method accounts for such overlaps and provides more precise size estimation.
The callback receives either:
com.tomtom.sdk.common.Result.success with
Memory.ZEROif all valid requested regions are up-to-date.com.tomtom.sdk.common.Result.success with the estimated download size if updates are available.
com.tomtom.sdk.common.Result.failure with MapUpdateError.MissingUpdates if update state information is not available for the requested regions. This can happen when:
Map updates are disabled.
Update states are still being fetched.
Update states are not available e.g. due to no network connectivity.
com.tomtom.sdk.common.Result.failure with MapUpdateError.NoMapAvailable if the map is not available.
com.tomtom.sdk.common.Result.failure with MapUpdateError.InvalidArgument if no valid regions are included in the request.
Return
A Cancellable handle. Call Cancellable.cancel to cancel the operation.
Parameters
The regions to calculate download size for.
Called with the result when available. Invoked on the main thread.
Throws
if NdsStore or RegionUpdater is closed.
if regions set is empty.