Questions tagged [download-manager]

A download-manager is often used for handling long-running downloads, and might support pausing, interrupting and resuming.

The download manager will conduct the download in the background, taking care of HTTP interactions and retrying downloads after failures or across connectivity changes and system reboots.

465 questions
5
votes
1 answer

DownloadManager not download file if it was already downloaded

I am using the DownloadManager to download my App-Files. If I put an url a second time into the DownloadManager it downloads the file and puts a -1 filename-1.file at the end. Is there a way to just not let the DownloadManager download it again? Or…
Informatic0re
  • 6,300
  • 5
  • 41
  • 56
5
votes
1 answer

Firefox Addon Downloads.jsm

I'm trying to use the Downloads.jsm lib of Firefox (it's new in Firefox 23) in a jetpack addin. var {Cu} = require("chrome"); //works fine const {Downloads} = Cu.import("resource://gre/modules/Downloads.jsm"); //works fine But executing either of…
balping
  • 7,518
  • 3
  • 21
  • 35
5
votes
1 answer

DownloadManager with cookie authentication

I'm trying to get a zip file using DownloadManager parsing a cookie with a JSESSIONID from my server. I'm getting this JSESSIONID doing all my process login using HTTPCLIENT lib and setting a variable JSESSIONID for later use in my DownloadManager…
Victor Laerte
  • 6,446
  • 13
  • 53
  • 102
5
votes
3 answers

Android: runtime-error 'Unable to create directory', on use of class DownloadManager, method setDestinationInExternalPublicDir

I'm getting this exception: 10-24 17:08:19.711: E/AndroidRuntime(1379): FATAL EXCEPTION: main 10-24 17:08:19.711: E/AndroidRuntime(1379): java.lang.RuntimeException: Unable to start activity…
MaiaVictor
  • 51,090
  • 44
  • 144
  • 286
5
votes
2 answers

DownloadManager with manually pause and resume

I need to implement Download-Manager with pause and resume mechanism. This manager is needed for downloading large video files or any other type. I thought about using Android's DownloadManager, but as far as I know the DownloadManager doesn't…
David
  • 37,109
  • 32
  • 120
  • 141
5
votes
2 answers

Error in download manager android

Using Android Download Manager i am trying to implement multiple download of pdf files synchronously (ie,an instance of the request is generated after successful completion of the previous request),soon after a DOWNLOAD_SUCCESS notification in the…
HjK
  • 3,513
  • 1
  • 17
  • 23
5
votes
1 answer

Calculating current (not average) download speed

In my download manager application, I'm using the code below to calculate the current transfer rate: TimeSpan interval = DateTime.Now - lastUpdateTime; downloadSpeed = (int)Math.Floor((double)(DownloadedSize + cachedSize -…
marko
  • 217
  • 1
  • 4
  • 14
4
votes
0 answers

Throttle/limit android.app.DownloadManager via code?

In my code I'm using the android.app.DownloadManager to download some assets required by our app. Sometimes it's 2 things, other times it might be 20 things. The problem is, that even on 3G if I call 'enque(Download.Request)' with my request, it…
rustyshelf
  • 44,963
  • 37
  • 98
  • 104
4
votes
4 answers

How to add download links to IDM from a program

I want to add some links to the IDM. can anyone give me a pseudo code for doing that. or a link to a page that explains how to do it.
DanMatlin
  • 1,212
  • 7
  • 19
  • 37
4
votes
2 answers

Why does requests stop?

I am making this app using tkinter and requests which is supposed to be like a download manager. I am using requests and recently I found out about the stream keyword argument in the requests.get(url) function to be able to write down the content…
Omid Ki
  • 155
  • 3
  • 13
4
votes
0 answers

android Download Manager is not storing files on External SD card and it fails executing request with status 403 on Android PIE OS9

I am downloading files using Android's Download Manager and storing the files on removeable SD Card. It is working on Android OS6 Marshmallow and Android OS8 Oreo but NOT working on Android OS9 PIE. setDestinationURI() is being used to store files…
4
votes
0 answers

DownloadManager on Android 9+ always fails and returns ERROR_CANNOT_RESUME

I have an Android app, which does download files for the user like this: DownloadManager downloadManager; // will be initialized from somewhere else DownloadManager.Request request = new…
4
votes
0 answers

When deleting an exoplayer download DownloadTracker.isDownloaded() returns true

I am having trouble determining wether a download is still downloaded if the download's files were removed from storage through the file explorer. I used the example code provided by the exoplayer team to implement my downloader. I have a function…
Craig
  • 548
  • 9
  • 24
4
votes
1 answer

Download Manager Not Working in Android Oreo

Mine is a cordova hybrid app. I have installed this plugin to download pdf files from server(url). It works fine in devices running in Android 7.0. When the same app is installed in Oreo devices, nothing happens and after some time, I see "download…
4
votes
2 answers

DownloadManager: download a file to cache partition

I am using the public api of class DownloadManager, I am able to download files to sdcard, so-called external storage. However, when I tried to download a file to other places, like /cache partition, it throw a security exception which says…
Jimmy
  • 573
  • 4
  • 9
  • 14