I'm using jWebView in my project for some single site stuff and have pondered this very thing.
There's no OnClick event (yet) to make things a bit easier but what you could do is use the
URL string variable in
OnStatus of
jWebView and monitor for a change of the
URL variable and then pass that variable to
jHttpClient to download, not very elegant but should be easy enough to catch as long as you know the main site URL so you can monitor for the change. It may be tricky to do this with dynamic URLs but if you know roughly what filename extensions you're looking for to download you could filter out the rest easily enough, I would have thought.
You can also use
CanNavi (boolean) in the same event to check for a valid URL too? if that's what it does (need to test that though).
To handle the file download you can either use the code in the AppDownloadManagerDemo1 Demo which you can use to download multiple files visually which will Notify to the device or a basic
jHttpClient download with no jBroadcastReceiver, I have used this demo in my app to do some basic multiple downloads to get some images down that match up with internal IDs in the app, but also used a basic
jHttpClient download direct with no
jBroadcastreceiver.
I tested linking to a zip file and it does register in the URL variable OK in
jWebView, so should be easy enough to implement.
Just add the following to the OnStatus method to show the URL on screen when you click a link, then you can play with that variable:
Should be fairly straightforward to use an intent as long as you know the package name, I will dig out my old delphi code when I used an intent to open Chrome/Firefox/Brave etc from a URL and try something tonight all things being well.
I hope this helps, if you want some code I can have a bash later, if you think this will do?