我试图在android lollipop中通过WebChromeClient
上传多个文件。但是无法做到。所以我使用third party library(CrossWalk)CrossWalk.
可以单独上传文件。所以,如何上传多个文件?
我的代码
private XWalkView xWalkWebView;
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
xWalkWebView.onActivityResult(requestCode, resultCode, data);
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.trigger_upload);
xWalkWebView=(XWalkView)findViewById(R.id.crosswalk_view);
XWalkPreferences.setValue(XWalkPreferences.REMOTE_DEBUGGING, true);
xWalkWebView.load("url", null);
}
public void openFileChooser(XWalkView view, final ValueCallback<Uri> uploadFile, String acceptType, String capture) {
uploadFile.onReceiveValue(null);
}
}