如何使用xWalkWebView在android webview中上传多个文件?

时间:2016-01-06 13:08:47

标签: android

我试图在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);
}


 }

0 个答案:

没有答案