简体   繁体   中英

Android downloadManager PAUSED_WAITING_FOR_NETWORK time

I looked everywhere for this and couldn't find, I'm using Android DownloadManager, during a file download I'm disabling the WIFI and Mobile data so there is no internet connection, The downloadmanager goes into Status: STATUS_PAUSED and reason: PAUSED_WAITING_FOR_NETWORK,

How many minutes will it wait until it fail? or stop permanently...? I've waited for an hour and it still paused and waiting for network...

From the android documentation : http://developer.android.com/reference/android/app/DownloadManager.html

The download manager is a system service that handles long-running HTTP downloads. Clients may request that a URI be downloaded to a particular destination file. The download manager will conduct the download in the background, taking care of HTTP interactions and retrying downloads afterfailures or across connectivity changes and system reboots .

As it is a system service, it depends on the android internals to make a call when to stop it and as your download is already enqueued, it shall try downloading again once restarted, till the staus is either STATUS_SUCCESSFUL or STATUS_FAILED.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM