-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restore selected files when Activity restores after being killed #1536
Comments
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! |
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
.The text was updated successfully, but these errors were encountered: