Package com.esri.arcgisruntime.io
Class ArcGISDownloadRequest
- java.lang.Object
-
- android.app.DownloadManager.Request
-
- com.esri.arcgisruntime.io.ArcGISDownloadRequest
-
public final class ArcGISDownloadRequest extends android.app.DownloadManager.Request
A request implementation that can be used to download ArcGIS resources using theandroid.app.DownloadManager
. ArcGISDownloadRequest handles authentication if the ArcGIS resource is secured.- Since:
- 100.0.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ArcGISDownloadRequest
createInstance(java.lang.String url)
Creates an ArcGISDownloadRequest instance from the specified URL.static ArcGISDownloadRequest
createInstance(java.lang.String url, Credential credential)
Creates an ArcGISDownloadRequest instance from the specified URL and Credential.static ListenableFuture<ArcGISDownloadRequest>
createInstanceAsync(java.lang.String url)
Asynchronously creates an ArcGISDownloadRequest instance from the specified URL.static ListenableFuture<ArcGISDownloadRequest>
createInstanceAsync(java.lang.String url, Credential credential)
Asynchronously creates an ArcGISDownloadRequest instance from the specified URL and Credential.-
Methods inherited from class android.app.DownloadManager.Request
addRequestHeader, allowScanningByMediaScanner, setAllowedNetworkTypes, setAllowedOverMetered, setAllowedOverRoaming, setDescription, setDestinationInExternalFilesDir, setDestinationInExternalPublicDir, setDestinationUri, setMimeType, setNotificationVisibility, setRequiresCharging, setRequiresDeviceIdle, setShowRunningNotification, setTitle, setVisibleInDownloadsUi
-
-
-
-
Method Detail
-
createInstanceAsync
public static ListenableFuture<ArcGISDownloadRequest> createInstanceAsync(java.lang.String url)
Asynchronously creates an ArcGISDownloadRequest instance from the specified URL.- Parameters:
url
- the URL of the ArcGIS resource to be downloaded- Returns:
- a ListenableFuture that provides a ArcGISDownloadRequest instance upon successful completion
- Since:
- 100.0.0
-
createInstanceAsync
public static ListenableFuture<ArcGISDownloadRequest> createInstanceAsync(java.lang.String url, Credential credential)
Asynchronously creates an ArcGISDownloadRequest instance from the specified URL and Credential.- Parameters:
url
- the URL of the ArcGIS resource to be downloadedcredential
- a Credential used to authenticate access to the remote ArcGIS resource to be downloaded- Returns:
- a ListenableFuture that provides a ArcGISDownloadRequest instance upon successful completion
- Since:
- 100.0.0
-
createInstance
public static ArcGISDownloadRequest createInstance(java.lang.String url) throws java.io.IOException
Creates an ArcGISDownloadRequest instance from the specified URL.Note - this method makes blocking network requests, thus must not be called from the UI thread. In that case use
createInstanceAsync(String)
instead.- Parameters:
url
- the URL of the ArcGIS resource to be downloaded- Returns:
- a ArcGISDownloadRequest instance if successful
- Throws:
java.lang.IllegalArgumentException
- if url is null or emptyjava.io.IOException
- if the authentication type could not be determined or a token could not be created- Since:
- 100.0.0
-
createInstance
public static ArcGISDownloadRequest createInstance(java.lang.String url, Credential credential) throws java.io.IOException
Creates an ArcGISDownloadRequest instance from the specified URL and Credential.Note - this method makes blocking network requests, thus must not be called from the UI thread. In that case use
createInstanceAsync(String, Credential)
instead.- Parameters:
url
- the URL of the ArcGIS resource to be downloadedcredential
- a Credential used to authenticate access to the remote ArcGIS resource to be downloaded- Returns:
- a ArcGISDownloadRequest instance if successful
- Throws:
java.lang.IllegalArgumentException
- if url is null or emptyjava.io.IOException
- if the authentication type could not be determined or a token could not be created- Since:
- 100.0.0
-
-