I am developing an Android app. Basically it is a WebView
and a progressBar. Facebook\'s mobile site (m.facebook.com) is loaded into the WebView
.>
Given the high number of votes I'm guessing no one has noticed the 3rd comment (from David Esteves) contains a link with to answer to this question.
Michel Olivier said:
This solution also works for Honeycomb and Ice Cream Sandwich. Seems like Google introduced a cool new feature (accept attribute) and forgot to to implement an overload for backwards compatibility.
So you just need to add a openFileChooser
overload to your MyWebChromeClient
class that accepts the string parameter and then call the one that does not:
public void openFileChooser( ValueCallback uploadMsg, String acceptType )
{
this.openFileChooser(uploadMsg);
}
Doing this I was able to make your code run as intended.