Reputation: 81
I need an application which will listen when some application starts downloading files (it will be evaluated like malicious behavior).
I was trying to do this with BroadcastReceiver and Intents, when I was filtering the "android.intent.action.DOWNLOAD_COMPLETE
" (in xml) and show it into Toast
, when some item was downloaded to the device, but it was not working for me.
I found now that there is exist a DownloadListener
, which contains a onDownloadStart(..)
method.
Do you think, that this can solve my problem?
Upvotes: 0
Views: 141
Reputation: 93688
Short of a custom version of the OS, you can't. At best, you could get a subset of requests that use DownloadManager. But most downloads don't use that- they just make direct HTTP requests. There's no way to track those from another application. If you were to use a custom version of the OS you could, but to get everything you'd pretty much need to be built into the Linux networking subsystem.
Upvotes: 1