3

I am using webview for my app, which is working good in Android Jelly Bean. The upload option is not working in Android KitKat and Lollipop.

I read some online forums and figured out that file upload is broken in KitKat version. So, I think that it would not work on KitKat.

But, I still want to know that how to call the file upload option in Android Lollipop in WebView.

Thanks

Chatty
  • 31
  • 1
  • 1
  • 3
  • Could Anybody Help Me? Also, I have target api to 15, so why doesn't kitkat and lollipop show the choose file dialog box when upload button is clicked. Thanks – Chatty Feb 04 '15 at 19:18

1 Answers1

2

The new api for Lollipop file upload is detailed here https://gauntface.com/blog/2014/10/17/what-you-need-to-know-about-the-webview-in-l

There is a full code sample here https://github.com/GoogleChrome/chromium-webview-samples/tree/master/input-file-example

David Glance
  • 619
  • 5
  • 8
  • Works only and only on Lollipop. No 5.0 below support. – TheOnlyAnil Mar 03 '15 at 14:40
  • For older versions : http://androidexample.com/Open_File_Chooser_With_Camera_Option_In_Webview_File_Option/index.php?view=article_discription&aid=128&aaid=148 – Eray Apr 11 '16 at 15:02