3

I'm creating a DownloadManager.Request like this:

  DownloadManager.Request request = new DownloadManager.Request(url);
  request.setDescription(fileName);
  request.setTitle("Title");

  request.setDestinationInExternalPublicDir(sourceDir, fileName);

  downloadManager.enqueue(request);

but I'm getting in log this warning: Missing request for path [path]

Do you know what it means? How can I solve it?

Pepa Zapletal
  • 2,879
  • 3
  • 39
  • 69

1 Answers1

1

There is a code in Android source repository

@Override
public void onScanCompleted(String path, Uri uri) {
    final ScanRequest req;
    synchronized (mConnection) {
        req = mPending.remove(path);
    }
    if (req == null) {
        Log.w(TAG, "Missing request for path " + path);
        return;
    }
...

It starts when download is completed and do removing of request from the pending list of downloads. For some reason there is no correct reference at the moment.

I've not found any errors due to this issue in my implementation, because after this message I always got Finished with status SUCCESS

UPDATE: I found that this message was produced by the method of the DownloadManager.Request class: request.allowScanningByMediaScanner(); which probably has an issue.

Roman Shishkin
  • 2,097
  • 20
  • 21