Open tunnela opened 1 year ago
Does anyone have time to implement this feature based on my https://github.com/tunnela/cordova-plugin-pending-files plugin? I'm currently so overwhelmed with other projects that it would be great if someone else could do it. Thanks!
Feature Request
Motivation Behind Feature
Currently, if you select file(s) via the
<input type="file">
element and the system decides to kill the Activity, the selected files will not be reachable when theActivity
restores. The problem can be reproduced by enablingAndroid > Settings > Developer Options > Don't keep activities
.Feature Description
A new
CordovaPlugin
is needed, which correctly returns the selected files with Cordova'sresume
event.CordovaPlugin
at:SystemWebChromeClient.java#L231-L253
...needs to be replaced with this new
CordovaPlugin
.Alternatives or Workarounds
I created a new Cordova plugin to solve this problem. See it here:
https://github.com/tunnela/cordova-plugin-pending-files
However, the implementation is not optimal, as I had to create a new class that extends the
SystemWebChromeClient
class of thecordova-android
package and which is set as the newWebChromeClient
when the my plugin is initialized. This may cause unexpected behavior. Therefore the newCordovaPlugin
should be part of thecordova-android
.