Upload camera photo and filechooser from webview INPUT field

后端 未结 3 1709
灰色年华
灰色年华 2020-12-28 11:13

My app is webbased and I need to upload pictures from an INPUT field camp. I\'ve two situations and as i don\'t know another way to do it depending the page I\'m choosing on

3条回答
  •  失恋的感觉
    2020-12-28 11:21

    Resolved and its working fine.

    Just look at the code of WebChromeClient class. You will find parameters are changed from earlier.

    public boolean onShowFileChooser(WebView webView, ValueCallback filePathCallback, WebChromeClient.FileChooserParams fileChooserParams) {
                           throw new RuntimeException("Stub!");
        }
    

    Solution:

    You just follow the latest ChromeBrowser code in this github link Android Chrome browser code on Github

    Utilize same github code for your project.

    Note: There is still issue with android 4.4 KitKat version. Except android 4.4 its working fine for other versions of Android.

    Because this is still open defect from Google. Please check in the below link.

    openFileChooser not called when is clicked on android 4.4 webview

提交回复
热议问题