can't open file chooser in WebView Android 4.4.2 using WebChromeClient

后端 未结 4 892
予麋鹿
予麋鹿 2021-01-06 06:03

In my webview by clicking \"Choose File\" button In samsung 7 inch tablet I want to open a File Browser, but I can\'t open this in Android Versi

4条回答
  •  一生所求
    2021-01-06 06:46

    The problem here is that in Android 4.4 the file input is not implemented and it will never work through the standard WebView interface. What I did in my project has been to use CrossWalk project to make it work fine. It has required quite a bit of work to change the default WebView from the standard Android one to CrossWalk, however it really served my needs quite well.

    Basically you need to replace the normal Android WebView with the CrossWalk webView. This had few advantages for us, including the fact that Chrome will be updated even on Android 4.0, 4.1 etc, giving us a much better support and fewer bugs.

    I documented how I implemented it here: http://blog.maurizionapoleoni.com/blog/implementing-a-file-input-with-camera-support-in-android-with-crosswalk/

提交回复
热议问题