Skip to content

Commit 88d86a7

Browse files
authoredAug 3, 2021
Fix saveImageIntoGallery not working on Android 11 (#230)
1 parent e3948dd commit 88d86a7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎BigImageViewer/src/main/java/com/github/piasy/biv/view/BigImageView.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,9 @@ public void saveImageIntoGallery() {
327327
ContentValues contentValues = new ContentValues();
328328
contentValues.put(MediaStore.MediaColumns.DISPLAY_NAME,
329329
mCurrentImageFile.getName());
330-
// this mime type doesn't really matter, so we just use jpg.
331-
contentValues.put(MediaStore.MediaColumns.MIME_TYPE, "image/jpg");
330+
// http://androidxref.com/4.4.4_r1/xref/libcore/luni/src/main/java/libcore/net/MimeUtils.java
331+
// Please select the appropriate MIME_TYPE in the webpage
332+
contentValues.put(MediaStore.MediaColumns.MIME_TYPE, "image/jpeg");
332333
contentValues.put(MediaStore.MediaColumns.RELATIVE_PATH,
333334
Environment.DIRECTORY_PICTURES);
334335
imageUri =

0 commit comments

Comments
 (0)
Please sign in to comment.