download-manager

Android DownloadManager Progress

試著忘記壹切 提交于 2019-11-27 17:27:11
i'm developing an app where users are able to download different content packages. For the download process i am using the DownloadManager class. Thats working fine so far. My Question is how can i get the current progress of a running Download which was started with the DownloadManager. I know that there is the buildin Download Notification and so on. But for me it is necessary that i get the progress of the running download so i can use it to show the progress in a custom progressbar in my app. So far i was not able to retrieve the progress. Is it even possible or am i just blind and can't

Set custom folder Android Download Manager

我只是一个虾纸丫 提交于 2019-11-27 12:43:42
I've a question about Download Manager. I'm going to download a file from a site. When I set the default directory for download (Environment.DIRECTORY_DOWNLOAD) all works fine and my download is started. But if I try to change the directory, my app doesn't download the file. In particular, I want my file to go into a folder inside a Download, for example /storage/sdcard/Download/myFolder. How can I fix that? File mydownload = new File (Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS)+ "/myFolder"); if (!mydownload.exists()){ mydownload.mkdir(); } String url = sUrl

Supporting resumable HTTP-downloads through an ASHX handler?

爷,独闯天下 提交于 2019-11-27 12:31:05
We are providing downloads of our application setups through an ASHX handler in ASP.NET. A customer told us he uses some third party download manager application and that our way of providing the files currently does not support the "resume" feature of his download manager application. My questions are: What are the basic ideas behind resuming a download? Is there a certain HTTP GET request that tells me the offset to start at? Resuming a download usually works through the HTTP Range header. For example, if a client wants only the second kilobyte of a file, it might send the header Range:

DownloadManager.ACTION_DOWNLOAD_COMPLETE broadcast receiver receiving same download id more than once with different download statuses in Android

泄露秘密 提交于 2019-11-27 11:28:56
I am using Android DownloadManger System Service for downloading some files in following way dwnId = mgr.enqueue(new DownloadManager.Request(serveruri) .setAllowedNetworkTypes(DownloadManager.Request.NETWORK_WIFI | DownloadManager.Request.NETWORK_MOBILE) .setAllowedOverRoaming(false) .setTitle(getAlbumName()) .setDescription(getTrackName()) .setDestinationUri(deviceUri) .setShowRunningNotification(true)); where mgr is Download Manager instance, dwnId is unique ID returned. I am also registering for ACTION_DOWNLOAD_COMPLETE registerReceiver(onDownloadComplete, new IntentFilter(DownloadManager

iOS Application Background Downloading

放肆的年华 提交于 2019-11-27 00:48:50
问题 Hey! I need to know how I can have my iOS Application start a download in the background of the application (like, have the download run in the AppDelegate file) so changing ViewControllers will not interrupt or cancel the download. I also need to be able to get the progress of the download ( 0.00000 - 1.00000 ), to set a UIProgressView object to, which also means I need a - (void)progressDidChangeTo:(int)progress function. 回答1: Just use ASIHTTPRequest it is way easier than NSURLRequest and

C# Downloader: should I use Threads, BackgroundWorker or ThreadPool?

谁说胖子不能爱 提交于 2019-11-26 20:21:40
问题 I'm writing a downloader in C# and stopped at the following problem: what kind of method should I use to parallelize my downloads and update my GUI? In my first attempt, I used 4 Threads and at the completion of each of them I started another one: main problem was that my cpu goes 100% at each new thread start. Googling around, I found the existence of BackgroundWorker and ThreadPool: stating that I want to update my GUI with the progress of each link that I'm downloading, what is the best

Windows Forms Webbrowswer control with IDownloadManager

独自空忆成欢 提交于 2019-11-26 20:15:24
问题 I'm using the Systems.Windows.Forms.Webbrowser control and need to override the download manager. I've followed the instructions here to subclass the form and override CreateWebBrowserSiteBase() /// <summary> /// Browser with download manager /// </summary> public class MyBrowser : WebBrowser { /// <summary> /// Returns a reference to the unmanaged WebBrowser ActiveX control site, /// which you can extend to customize the managed <see ref="T:System.Windows.Forms.WebBrowser"/> control. /// <

Android DownloadManager Progress

隐身守侯 提交于 2019-11-26 18:59:34
问题 i'm developing an app where users are able to download different content packages. For the download process i am using the DownloadManager class. Thats working fine so far. My Question is how can i get the current progress of a running Download which was started with the DownloadManager. I know that there is the buildin Download Notification and so on. But for me it is necessary that i get the progress of the running download so i can use it to show the progress in a custom progressbar in my

Set custom folder Android Download Manager

时光怂恿深爱的人放手 提交于 2019-11-26 16:07:07
问题 I've a question about Download Manager. I'm going to download a file from a site. When I set the default directory for download (Environment.DIRECTORY_DOWNLOAD) all works fine and my download is started. But if I try to change the directory, my app doesn't download the file. In particular, I want my file to go into a folder inside a Download, for example /storage/sdcard/Download/myFolder. How can I fix that? File mydownload = new File (Environment.getExternalStoragePublicDirectory(Environment

DownloadManager.ACTION_DOWNLOAD_COMPLETE broadcast receiver receiving same download id more than once with different download statuses in Android

心已入冬 提交于 2019-11-26 15:35:40
问题 I am using Android DownloadManger System Service for downloading some files in following way dwnId = mgr.enqueue(new DownloadManager.Request(serveruri) .setAllowedNetworkTypes(DownloadManager.Request.NETWORK_WIFI | DownloadManager.Request.NETWORK_MOBILE) .setAllowedOverRoaming(false) .setTitle(getAlbumName()) .setDescription(getTrackName()) .setDestinationUri(deviceUri) .setShowRunningNotification(true)); where mgr is Download Manager instance, dwnId is unique ID returned. I am also