diff --git a/src/imagepicker.android.ts b/src/imagepicker.android.ts index 5037f76..cc5c9cc 100644 --- a/src/imagepicker.android.ts +++ b/src/imagepicker.android.ts @@ -227,19 +227,13 @@ export class ImagePicker { let intent = new Intent(); intent.setType(this.mediaType); - let length = this.mediaType === "*/*" ? 2 : 1; - let mimeTypes = Array.create(java.lang.String, length); - - if (this.mediaType === "*/*") { - mimeTypes[0] = "image/*"; - mimeTypes[1] = "video/*"; - } - else { + if (this.mediaType !== '*/*') { + let mimeTypes = Array.create(java.lang.String, 1); mimeTypes[0] = this.mediaType; + // not in platform-declaration typings + intent.putExtra((android.content.Intent as any).EXTRA_MIME_TYPES, mimeTypes); } - // not in platform-declaration typings - intent.putExtra((android.content.Intent as any).EXTRA_MIME_TYPES, mimeTypes); // TODO: Use (android).content.Intent.EXTRA_ALLOW_MULTIPLE if (this.mode === 'multiple') { intent.putExtra("android.intent.extra.ALLOW_MULTIPLE", true);