nativescript-imagepicker
Advanced tools
Comparing version 6.3.0 to 7.0.0
@@ -137,3 +137,3 @@ "use strict"; | ||
get: function () { | ||
var mediaType = this._options && 'mediaType' in this._options ? this._options.mediaType : imagepicker_common_1.ImagePickerMediaType.Image; | ||
var mediaType = this._options && 'mediaType' in this._options ? this._options.mediaType : imagepicker_common_1.ImagePickerMediaType.Any; | ||
if (mediaType === imagepicker_common_1.ImagePickerMediaType.Image) { | ||
@@ -213,2 +213,12 @@ return "image/*"; | ||
intent.setType(_this.mediaType); | ||
var length = _this.mediaType === "*/*" ? 2 : 1; | ||
var mimeTypes = Array.create(java.lang.String, length); | ||
if (_this.mediaType === "*/*") { | ||
mimeTypes[0] = "image/*"; | ||
mimeTypes[1] = "video/*"; | ||
} | ||
else { | ||
mimeTypes[0] = _this.mediaType; | ||
} | ||
intent.putExtra(android.content.Intent.EXTRA_MIME_TYPES, mimeTypes); | ||
if (_this.mode === 'multiple') { | ||
@@ -215,0 +225,0 @@ intent.putExtra("android.intent.extra.ALLOW_MULTIPLE", true); |
{ | ||
"name": "nativescript-imagepicker", | ||
"version": "6.3.0", | ||
"version": "7.0.0", | ||
"description": "A plugin for the NativeScript framework implementing multiple image picker", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -136,3 +136,3 @@ # NativeScript Image Picker ![apple](https://cdn3.iconfinder.com/data/icons/picons-social/57/16-apple-32.png) ![android](https://cdn4.iconfinder.com/data/icons/logos-3/228/android-32.png) | ||
| numberOfColumnsInLandscape | iOS | 7 | Set the number of columns in Landscape orientation. | | ||
| mediaType | both | Any (iOS), Image (Android) | Choose whether to pick Image/Video/Any type of assets. | | ||
| mediaType | both | Any | Choose whether to pick Image/Video/Any type of assets. | | ||
@@ -139,0 +139,0 @@ The **hostView** parameter can be set to the view that hosts the image picker. Applicable in iOS only, intended to be used when open picker from a modal page. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52722
570