Github user dpolivy commented on the pull request:
https://github.com/apache/cordova-plugin-camera/pull/97#issuecomment-113321831
I am looking at porting this into my fork of the camera plugin, and have a
few suggestions/improvements to add (some I've addressed, some not yet). I'm
not 100% done yet, but here's what I've seen off the bat:
* After retrieving the saved result, you should zero/null out the saved*
instance variables.
* Creating this.imageUri should only happen inside the `if
(savedRequestCode > 0...` block.
* The `onActivityResult` code can be simplified to just `return` after
saving the values, to avoid the extra `else` block around the existing method.
* The `encodingType` is assumed to be JPEG when creating the temp file.
This may not be the user's desired encoding. Is it possible to save some of the
instance variables away in `onSaveInstanceState()`?
* Related to the prior comment, it might make sense for
`checkForSavedResult` to take the same CameraOptions object that was passed to
the original call, so it can properly restore state in the object.
I've updated my Nexus 5 to Android 5.1.1, and with the "always destroy
activities" developer setting enabled, sometimes I'm finding that my main
activity isn't being resumed at all -- after the camera disappears, I am left
on the device home screen. Anyone else seen this?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]