Fix MimeType for API 30

This commit is contained in:
Syar-tech 2021-06-11 15:59:48 +02:00
parent d34313424b
commit 8eace315d3
1 changed files with 1 additions and 1 deletions

View File

@ -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