Class OfflineDownloadOptions.Builder

  • Enclosing class:
    OfflineDownloadOptions

    public abstract static class OfflineDownloadOptions.Builder
    extends java.lang.Object
    The Builder class in charge of constructing this class and setting the values accordingly.
    Since:
    0.1.0
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • uuid

        public abstract OfflineDownloadOptions.Builder uuid​(@NonNull
                                                            java.lang.Long uuid)
        Internal usage only

        A region id which the service provides so internally identifying a particular region is easier during the download session.

        Parameters:
        uuid - a long, unique, identifier for this offline download region provided by the download service.
        Returns:
        this builder for chaining options together
        Since:
        0.1.0
      • progress

        public abstract OfflineDownloadOptions.Builder progress​(int progress)
        Current download progress for this specific offline region. This will be 0 until the download actually starts and will be a value between 0 and 100 once the download begins. OfflinePlugin.onProgressChanged(OfflineDownloadOptions, int) should be used during the download session to get progress updates.
        Parameters:
        progress - an integer value between 0 and 100 representing the download progress
        Returns:
        this builder for chaining options together
        Since:
        0.1.0
      • definition

        public abstract OfflineDownloadOptions.Builder definition​(@NonNull
                                                                  com.mapbox.mapboxsdk.offline.OfflineRegionDefinition definition)
        The download definition which is used to actually launch the download inside the service. This object particularly contains information such as the region bounding box, zoom levels, pixel density, etc.
        Parameters:
        definition - the Map SDK Offline region definition which can be used to acquire region download definition information
        Returns:
        this builder for chaining options together
        Since:
        0.1.0
      • notificationOptions

        public abstract OfflineDownloadOptions.Builder notificationOptions​(NotificationOptions notificationOptions)
        Launching the service requires a notification, using the NotificationOptions class allows you to customize this notification and will be displayed for the offline download region while the service is running in the background.
        Parameters:
        notificationOptions - the NotificationOptions which will be used during the download process
        Returns:
        this builder for chaining options together
        Since:
        0.1.0
      • regionName

        public abstract OfflineDownloadOptions.Builder regionName​(@Nullable
                                                                  java.lang.String regionName)
        A convenient method for providing the offline region a name which can then be used later to identify the specific region in the database of offline region tiles.
        Parameters:
        regionName - the string which represents this offline regions name
        Returns:
        this builder for chaining options together
        Since:
        0.1.0
      • metadata

        public abstract OfflineDownloadOptions.Builder metadata​(@NonNull
                                                                byte[] metadata)
        Metadata can optionally be added to your offline download region which can contain any additional information you desire.
        Parameters:
        metadata - a byte array representing the optional metadata
        Returns:
        this builder for chaining options together
        Since:
        0.1.0