From 8eace315d356f285c63345e56db2853fd6f02c03 Mon Sep 17 00:00:00 2001 From: Syar-tech <51356918+Syar-tech@users.noreply.github.com> Date: Fri, 11 Jun 2021 15:59:48 +0200 Subject: [PATCH] Fix MimeType for API 30 --- android/src/main/java/com/rncamerakit/CKCamera.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/src/main/java/com/rncamerakit/CKCamera.kt b/android/src/main/java/com/rncamerakit/CKCamera.kt index 0bcb48f..e17f356 100644 --- a/android/src/main/java/com/rncamerakit/CKCamera.kt +++ b/android/src/main/java/com/rncamerakit/CKCamera.kt @@ -283,7 +283,7 @@ class CKCamera(context: ThemedReactContext) : FrameLayout(context), LifecycleObs // Create output options object which contains file + metadata val contentValues = ContentValues().apply { put(MediaStore.MediaColumns.DISPLAY_NAME, "IMG_" + System.currentTimeMillis()) - put(MediaStore.MediaColumns.MIME_TYPE, "image/jpg") + put(MediaStore.MediaColumns.MIME_TYPE, MimeTypeMap.getSingleton().getMimeTypeFromExtension("jpg")) } // Create the output file option to store the captured image in MediaStore