[
https://issues.apache.org/jira/browse/CB-8804?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14595733#comment-14595733
]
ASF GitHub Bot commented on CB-8804:
------------------------------------
Github user thehuijb commented on a diff in the pull request:
https://github.com/apache/cordova-plugin-camera/pull/97#discussion_r32921216
--- Diff: src/android/CameraLauncher.java ---
@@ -173,6 +181,20 @@ else if ((srcType == PHOTOLIBRARY) || (srcType ==
SAVEDPHOTOALBUM)) {
// LOCAL METHODS
//--------------------------------------------------------------------------
+ private void processConfiguration(JSONArray args) throws JSONException
{
+ if (args == null)
+ throw new JSONException("no configuration object passed");
+ this.mQuality = args.optInt(0, 80);
+ // args 1 and 2 (destType, srcType) are skipped because they have
no field representation in this class
+ this.targetWidth = args.optInt(3);
+ this.targetHeight = args.optInt(4);
+ this.encodingType = args.optInt(5, JPEG);
+ this.mediaType = args.optInt(6, PICTURE);
+ this.allowEdit = args.optBoolean(7);
+ this.correctOrientation = args.optBoolean(8);
+ this.saveToPhotoAlbum = args.optBoolean(9);
+ }
--- End diff --
this might be a little to much, optInt already defaults to 0 and optBoolean
to false.
no need to explicitly define these defaults.
> 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]