[
https://issues.apache.org/jira/browse/CB-8804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14594158#comment-14594158
]
ASF GitHub Bot commented on CB-8804:
------------------------------------
Github user dpolivy commented on a diff in the pull request:
https://github.com/apache/cordova-plugin-camera/pull/97#discussion_r32879192
--- Diff: src/android/CameraLauncher.java ---
@@ -124,16 +127,9 @@ public boolean execute(String action, JSONArray args,
CallbackContext callbackCo
this.mediaType = PICTURE;
this.mQuality = 80;
--- End diff --
I would get rid of all of these defaults here. I like your use of `optInt`,
and passing in defaults; would suggest just eliminating the forced defaults
above and go with the single line initialization in the method.
FWIW, here's how I ported this to my local copy:
if (action.equals("takePicture")) {
int srcType = args.optInt(2, CAMERA);
int destType = args.optInt(1, FILE_URI);
// Process the rest of the configuration arguments
processConfiguration(args);
...
> https://github.com/apache/cordova-plugin-camera#android-quirks
> --------------------------------------------------------------
>
> Key: CB-8804
> URL: https://issues.apache.org/jira/browse/CB-8804
> Project: Apache Cordova
> Issue Type: Improvement
> Components: Plugin Camera
> Environment: Android
> Reporter: Serge Huijben
>
> Android Quirks
> Android uses intents to launch the camera activity on the device to capture
> images, and on phones with low memory, the Cordova activity may be killed. In
> this scenario, the image may not appear when the Cordova activity is restored.
> It can be solved bij implementing this PR:
> https://github.com/apache/cordova-plugin-camera/pull/97
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]