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
    • Method Detail

      • createInstanceAsync

        public static ListenableFuture<ArcGISDownloadRequest> createInstanceAsync​(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​(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​(String url)
                                                    throws 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:
        IllegalArgumentException - if url is null or empty
        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​(String url,
                                                           Credential credential)
                                                    throws 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:
        IllegalArgumentException - if url is null or empty
        IOException - if the authentication type could not be determined or a token could not be created
        Since:
        100.0.0