From 71051fe928fc2bb0f38e40be023a5f2b4ad2d18f Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 23 Mar 2017 18:26:05 +0100 Subject: [PATCH] use the default file mimetype at sharing a file --- app/build.gradle | 2 +- .../kotlin/com/simplemobiletools/gallery/extensions/activity.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index c2717ed6a..e98f50684 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -32,7 +32,7 @@ android { } dependencies { - compile 'com.simplemobiletools:commons:2.13.7' + compile 'com.simplemobiletools:commons:2.14.1' compile 'com.theartofdev.edmodo:android-image-cropper:2.3.1' compile 'com.bignerdranch.android:recyclerview-multiselect:0.2' compile 'com.google.code.gson:gson:2.8.0' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt index a52a06377..f95add05b 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt @@ -85,7 +85,7 @@ fun Activity.openWith(file: File, forceChooser: Boolean = true) { val uri = Uri.fromFile(file) Intent().apply { action = Intent.ACTION_VIEW - setDataAndType(uri, file.getMimeType("image/jpeg")) + setDataAndType(uri, file.getMimeType()) addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION) val chooser = Intent.createChooser(this, getString(R.string.open_with))