Arguments are passed as JSON array, not JSON object.

This commit is contained in:
Bryce Curtis 2012-02-19 00:15:23 -06:00
parent cc8edea065
commit 9188773152

View File

@ -108,16 +108,12 @@ public class CameraLauncher extends Plugin {
this.mediaType = PICTURE; this.mediaType = PICTURE;
this.mQuality = 80; this.mQuality = 80;
JSONObject options = args.optJSONObject(0); this.mQuality = args.getInt(0);
if (options != null) { destType = args.getInt(1);
srcType = options.getInt("sourceType"); srcType = args.getInt(2);
destType = options.getInt("destinationType"); this.targetWidth = args.getInt(3);
this.targetHeight = options.getInt("targetHeight"); this.targetHeight = args.getInt(4);
this.targetWidth = options.getInt("targetWidth"); this.encodingType = args.getInt(5);
this.encodingType = options.getInt("encodingType");
this.mediaType = options.getInt("mediaType");
this.mQuality = options.getInt("quality");
}
if (srcType == CAMERA) { if (srcType == CAMERA) {
this.takePicture(destType, encodingType); this.takePicture(destType, encodingType);