Class OfflineDownloadOptions
- java.lang.Object
-
- com.mapbox.mapboxsdk.plugins.offline.model.OfflineDownloadOptions
-
- All Implemented Interfaces:
android.os.Parcelable
public abstract class OfflineDownloadOptions extends java.lang.Object implements android.os.ParcelableThis model class wraps the offline region definition with notifications options and the offline region metadata. It is a companion object toOfflineRegionwith regionId andOfflineDownloadServicewith serviceId.- Since:
- 0.1.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOfflineDownloadOptions.BuilderThe Builder class in charge of constructing this class and setting the values accordingly.
-
Constructor Summary
Constructors Constructor Description OfflineDownloadOptions()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static OfflineDownloadOptions.Builderbuilder()Used to build a new instance of this class.abstract com.mapbox.mapboxsdk.offline.OfflineRegionDefinitiondefinition()The download definition which is used to actually launch the download inside the service.abstract byte[]metadata()Metadata can optionally be added to your offline download region which can contain any additional information you desire.abstract NotificationOptionsnotificationOptions()Launching the service requires a notification, using theNotificationOptionsclass allows you to customize this notification and will be displayed for the offline download region while the service is running in the background.abstract intprogress()Current download progress for this specific offline region.abstract java.lang.StringregionName()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.abstract OfflineDownloadOptions.BuildertoBuilder()A convenient way to build a new instance of this class using all of the same values this current instance has.abstract java.lang.Longuuid()A region id which the service provides so internally identifying a particular region is easier during the download session.
-
-
-
Method Detail
-
definition
@NonNull public abstract 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.- Returns:
- the Map SDK Offline region definition which can be used to acquire region download definition information
- Since:
- 0.1.0
-
notificationOptions
public abstract NotificationOptions notificationOptions()
Launching the service requires a notification, using theNotificationOptionsclass allows you to customize this notification and will be displayed for the offline download region while the service is running in the background.- Returns:
- the
NotificationOptionswhich will be used during the download process - Since:
- 0.1.0
-
regionName
@Nullable public abstract 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.- Returns:
- the string which represents this offline regions name
- Since:
- 0.1.0
-
metadata
public abstract byte[] metadata()
Metadata can optionally be added to your offline download region which can contain any additional information you desire.- Returns:
- a byte array representing the optional metadata
- Since:
- 0.1.0
-
progress
public abstract 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.- Returns:
- an integer value between 0 and 100 representing the download progress
- Since:
- 0.1.0
-
uuid
@NonNull public abstract java.lang.Long uuid()
A region id which the service provides so internally identifying a particular region is easier during the download session. You'll rarely, if ever, need to use this information.- Returns:
- a long, unique, identifier for this offline download region
- Since:
- 0.1.0
-
builder
public static OfflineDownloadOptions.Builder builder()
Used to build a new instance of this class.- Returns:
- this classes builder class
- Since:
- 0.1.0
-
toBuilder
public abstract OfflineDownloadOptions.Builder toBuilder()
A convenient way to build a new instance of this class using all of the same values this current instance has. Use this when you wish to modify a single entry.- Returns:
- a new
OfflineDownloadOptions.Builderinstance with all the same values this classes instance contains - Since:
- 0.1.0
-
-