How to upload files inside WebView?

I have an application that loads WebView. Inside the WebView, the loaded page has a file upload control (html input = file). The button is visible and it says β€œSelect File,” however, if you press the button, nothing will happen. If you use the default Android browser and load the same page and click on the button, it displays a window allowing you to select a file from your gallery, files, etc. Why doesn't it work from WebView?

I suppose I need to redefine something, but I don't know what it could be. Basically, I want to be able to download photos from my application, as I can already do from my web application that runs in a browser. The native version of the / webview application should work the same way, but the "Select File" button does nothing.

Thanks.

+7
source share

All Articles