Question

I can receive the intent of "android.intent.action.DOWNLOAD_COMPLETE" from DownloadManager which I implement, but I can't receive it when download a file by browser. Dose anyone know how to do?

Was it helpful?

Solution

The solutions you are trying , I don't think so its possible. The Possible solutions you should try is use File Observer , Which basically does :

Monitors files (using inotify) to fire an event after files are accessed or changed by by any process on the device (including this one). FileObserver is an abstract class; subclasses must implement the event handler onEvent(int, String).

Each FileObserver instance monitors a single file or directory. If a directory is monitored, events will be triggered for all files and subdirectories inside the monitored directory.

An event mask is used to specify which changes or actions to report. Event type constants are used to describe the possible changes in the event mask as well as what actually happened in event callbacks.

You should download the file in directory where you have registered the FileObserver to look for all the events from your app and get the event notification accordingly

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top