Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.14.2
-
None
-
Anroid , Samsung Note - 5 Device
Description
The current webview implementation does not allow file upload via
HTML <input type="file"> tags.
I have created a patch that overrides onShowFileChooser of WebChromeClient
used in WebView.
https://developer.android.com/reference/android/webkit/WebChromeClient#onShowFileChooser(android.webkit.WebView,%20android.webkit.ValueCallback%3Candroid.net.Uri[]%3E,%20android.webkit.WebChromeClient.FileChooserParams)
And it seems to work.
But this implementation requires startActivityForResult with intent Intent.ACTION_CHOOSE
and a matching onActivityResult implementation. As a result it requires more work on
part of developer to use a custom class in place of QtActivity for the main activity
of app. The custom class is required so that onActivityResult can be overridden.
Are there better ideas to implement it?
I explored Fragments inside QtAndroidWebViewController.java but it seems to
require android support package or androidx.