第2个回答 2016-07-17
提供下思路
mWebView.setWebChromeClient(new WebChromeClient() { public void openFileChooser(ValueCallback<Uri> uploadFile, String acceptType) { });复制代码
可以阅读下WebChromeClient的源码,我就摘抄下吧
/**
* Tell the client to open a file chooser.
* @param uploadFile A ValueCallback to set the URI of the file to upload.
* onReceiveValue must be called to wake up the thread.a
* @param acceptType The value of the 'accept' attribute of the input tag
* associated with this file picker.
* @hide
*/如果不管用添加这个方法
public void openFileChooser(ValueCallback<Uri> uploadFile, String acceptType,String capture)
因为Android API变化了。本回答被提问者采纳