Feature Request
Modify the onShowFileChooser method within the SystemWebChromeClient class to implement corresponding folder selection or save functionality when the fileChooserParams parameter is set to MODE_OPEN_FOLDER or MODE_SAVE.
Motivation Behind Feature
In WebView versions 132 and above, resolve the errors where JavaScript's showDirectoryPicker and showSaveFilePicker methods result in "The user aborted a request" responses.
Feature Description
In WebView versions 132 and above, support has been introduced for the following new methods:
- showDirectoryPicker
- showSaveFilePicker
- showOpenFilePicker
I have observed that showOpenFilePicker works correctly, but showDirectoryPicker and showSaveFilePicker return errors indicating "The user aborted a request".
Upon examining the source code, I found that the onShowFileChooser method within the SystemWebChromeClient class can support these functionalities based on the fileChooserParams parameter. However, Cordova currently lacks support for these features.
Are there any drawbacks? Will this break anything for existing users?
It is important to consider potential compatibility issues with existing applications. The implementation should be carefully tested to ensure it does not introduce regressions.
Alternatives or Workarounds
Proposed Solution:
Modify the onShowFileChooser method within the SystemWebChromeClient class so that it implements the appropriate folder selection or save operations when the fileChooserParams parameter indicates MODE_OPEN_FOLDER or MODE_SAVE.
However, I have not attempted this solution myself due to my limited expertise in this area.
Feature Request
Modify the
onShowFileChoosermethod within theSystemWebChromeClientclass to implement corresponding folder selection or save functionality when thefileChooserParamsparameter is set to MODE_OPEN_FOLDER or MODE_SAVE.Motivation Behind Feature
In WebView versions 132 and above, resolve the errors where JavaScript's
showDirectoryPickerandshowSaveFilePickermethods result in "The user aborted a request" responses.Feature Description
In WebView versions 132 and above, support has been introduced for the following new methods:
I have observed that
showOpenFilePickerworks correctly, butshowDirectoryPickerandshowSaveFilePickerreturn errors indicating "The user aborted a request".
Upon examining the source code, I found that the
onShowFileChoosermethod within theSystemWebChromeClientclass can support these functionalities based on thefileChooserParamsparameter. However, Cordova currently lacks support for these features.Are there any drawbacks? Will this break anything for existing users?
It is important to consider potential compatibility issues with existing applications. The implementation should be carefully tested to ensure it does not introduce regressions.
Alternatives or Workarounds
Proposed Solution:
Modify the
onShowFileChoosermethod within theSystemWebChromeClientclass so that it implements the appropriate folder selection or save operations when thefileChooserParamsparameter indicates MODE_OPEN_FOLDER or MODE_SAVE.
However, I have not attempted this solution myself due to my limited expertise in this area.