It’s just NOT working.
I’m doing this
webView.setWebChromeClient(new WebChromeClient() {
public void openFileChooser(ValueCallback<Uri> uploadFile) {
System.out.println("openFileChooser");
mUploadMessage = uploadFile;
Intent i = new Intent(Intent.ACTION_GET_CONTENT);
i.addCategory(Intent.CATEGORY_OPENABLE);
i.setType("file/*");
PresentationActivity.this.startActivityForResult(
Intent.createChooser(i, "Image Browser"),
FILECHOOSER_RESULTCODE);
}
});
but openFileChooser is never called.
Any ideas? openFileChooser is marked @hide in Android source code.
I think its because you should NOT use this method. Is there another possibility to open a fileChooser??
Parameters for openFileChooser have been updated some times.
For Android 3.0 – 4.0, it is
for 4.1,
and for 2.x
You’ll have to add all of them to support any devices between Android 2.0 and 4.1.