mirror of
https://gitee.com/shuto/cordova-imagePicker.git
synced 2026-05-23 00:05:03 +08:00
Updated ImagePicker to grab output type from options and pass to plugin intent
This commit is contained in:
@@ -31,6 +31,7 @@ public class ImagePicker extends CordovaPlugin {
|
||||
int desiredWidth = 0;
|
||||
int desiredHeight = 0;
|
||||
int quality = 100;
|
||||
int outputType = 0;
|
||||
if (this.params.has("maximumImagesCount")) {
|
||||
max = this.params.getInt("maximumImagesCount");
|
||||
}
|
||||
@@ -43,10 +44,14 @@ public class ImagePicker extends CordovaPlugin {
|
||||
if (this.params.has("quality")) {
|
||||
quality = this.params.getInt("quality");
|
||||
}
|
||||
if (this.params.has("outputType")) {
|
||||
outputType = this.params.getInt("outputType");
|
||||
}
|
||||
intent.putExtra("MAX_IMAGES", max);
|
||||
intent.putExtra("WIDTH", desiredWidth);
|
||||
intent.putExtra("HEIGHT", desiredHeight);
|
||||
intent.putExtra("QUALITY", quality);
|
||||
intent.putExtra("OUTPUT_TYPE", outputType);
|
||||
if (this.cordova != null) {
|
||||
this.cordova.startActivityForResult((CordovaPlugin) this, intent, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user