Class ArcGISDownloadRequest


  • public final class ArcGISDownloadRequest
    extends android.app.DownloadManager.Request
    A request implementation that can be used to download ArcGIS resources using the android.app.DownloadManager. ArcGISDownloadRequest handles authentication if the ArcGIS resource is secured.
    Since:
    100.0.0
    • Field Summary

      • Fields inherited from class android.app.DownloadManager.Request

        NETWORK_MOBILE, NETWORK_WIFI, VISIBILITY_HIDDEN, VISIBILITY_VISIBLE, VISIBILITY_VISIBLE_NOTIFY_COMPLETED, VISIBILITY_VISIBLE_NOTIFY_ONLY_COMPLETION
    • 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 downloaded
        credential - 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 empty
        java.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 downloaded
        credential - 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 empty
        java.io.IOException - if the authentication type could not be determined or a token could not be created
        Since:
        100.0.0