I have a webview that shows a website which i did not make so i dont know the details of how it works.
On this site there are several buttons which download various files which are generated on the fly. Here is an example of the url request used on one of these buttons: test.example.com/Test/Export/Stuff?format=Pdf
This causes a file to be downloaded on my desktop browser and on my phones chrome but nothing happens on my app.
I have scoured the internet searching for a solution but i am unable to find one that works.
I have tried setting DownloadListener as discribed here: https://forums.xamarin.com/discussion/4605/download-file-by-webview but the OnDownloadStart never triggers.
I have also tried intercepting the url request using ShouldOverrideUrlLoading in my custom WebViewClient as descibed in other posts with no luck.
Here is the html code for the button:
<input id="exportPdfButton" class="secondary hover" format="Pdf" value="Download (PDF)" name="exportPdfButton" type="submit">
<script id="dxss_848651839" type="text/javascript">
<!--
var dxo = new MVCxClientButton('exportPdfButton');
dxo.InitGlobalVariable('exportPdfButton');
dxo.SetProperties({'autoPostBack':true,'isNative':true});
dxo.SetEvents({'Click':ExportButtonOnClick});
dxo.AfterCreate();
//-->
</script>
I have set permissions for ACCESS_DOWNLOAD_MANAGER, WRITE_EXTERNAL_STORAGE etc.
Can anyone help me figure out how i can download these files in the app? Otherwise is there any other information i can provide to help?