We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我是做前端的,不太懂java,,想在webview 调用它?请问怎么实现
The text was updated successfully, but these errors were encountered:
我是通过图片路径生成uri对象数组 然后回传给h5的 // 图片选择或者拍照之后的会回调
if (requestCode == WebviewGlobals.CHOOSE_IMAGES_REQUEST_CODE && resultCode == RESULT_OK) { // 拿到选中图片路径 mImagePaths = data.getStringArrayListExtra(ImagePicker.EXTRA_SELECT_IMAGES); // 初始化Uri数组 Uri[] results = new Uri[mImagePaths.size()]; // 通过路径生成Uri对象保存在数组中 for (int i = 0; i < mImagePaths.size(); i++) { results[i] = Uri.parse(mImagePaths.get(i)); } // 传给h5的input标签 mX5WebView.getX5WebChromeClient().getmUploadCallbackAboveL().onReceiveValue(results);//将文件路径返回去,填充到input中 mX5WebView.getX5WebChromeClient().setmUploadCallbackAboveL(null); }
Sorry, something went wrong.
你搜索 webview 与原生交互就行了 就是两边定义一个相同的方法 很简单的
No branches or pull requests
我是做前端的,不太懂java,,想在webview 调用它?请问怎么实现
The text was updated successfully, but these errors were encountered: