From 58ed44edb7cad2bdda8277b32db4dd5b828518ac Mon Sep 17 00:00:00 2001 From: andrei0807 <32348752+andrei0807@users.noreply.github.com> Date: Tue, 7 Feb 2023 09:26:34 +0800 Subject: [PATCH] allow select heic file in android I can not select HEIC file in android now. so I added this mime type. --- .../com/reactnative/ivpusic/imagepicker/PickerModule.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/src/main/java/com/reactnative/ivpusic/imagepicker/PickerModule.java b/android/src/main/java/com/reactnative/ivpusic/imagepicker/PickerModule.java index 248f06b8a..07c1fe3bf 100644 --- a/android/src/main/java/com/reactnative/ivpusic/imagepicker/PickerModule.java +++ b/android/src/main/java/com/reactnative/ivpusic/imagepicker/PickerModule.java @@ -369,7 +369,7 @@ private void initiatePicker(final Activity activity) { if (cropping || mediaType.equals("photo")) { galleryIntent.setType("image/*"); if (cropping) { - String[] mimetypes = {"image/jpeg", "image/png"}; + String[] mimetypes = {"image/jpeg", "image/png", "image/heic"}; galleryIntent.putExtra(Intent.EXTRA_MIME_TYPES, mimetypes); } } else if (mediaType.equals("video")) { @@ -938,4 +938,4 @@ private static WritableMap getCroppedRectMap(Intent data) { return map; } -} \ No newline at end of file +}