Android WebView 未在棉花糖及以上设备中调用 openFileChooser

问题描述

我正在尝试在我的应用程序的网页中上传文件,但未显示文件选择,并且在 google chrome 中工作正常

activity_main_webview.webChromeClient = object : WebChromeClient() {`
        // openFileChooser for Android 3.0+
        fun openFileChooser(uploadMsg: ValueCallback<Uri?>,acceptType: String?) {
            // Update message
            mUploadMessage = uploadMsg
            try {
                ....
            } catch (e: Exception) {
                Toast.makeText(
                    baseContext,"Exception:$e",Toast.LENGTH_LONG
                ).show()
            }
        }

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)