diff --git a/app/build.gradle b/app/build.gradle index 2941b290c..53da5228b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -37,7 +37,7 @@ android { } dependencies { - compile 'com.simplemobiletools:commons:2.32.12' + compile 'com.simplemobiletools:commons:2.32.15' compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.6.0' compile 'com.theartofdev.edmodo:android-image-cropper:2.4.0' compile 'com.bignerdranch.android:recyclerview-multiselect:0.2' 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 5423a0777..3e4c91de9 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/extensions/activity.kt @@ -3,6 +3,7 @@ package com.simplemobiletools.gallery.extensions import android.app.Activity import android.content.Intent import android.net.Uri +import android.os.TransactionTooLargeException import android.provider.MediaStore import android.support.v7.app.AppCompatActivity import android.view.View @@ -61,7 +62,11 @@ fun Activity.shareMedia(media: List) { type = uris.getMimeType() addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION) putParcelableArrayListExtra(Intent.EXTRA_STREAM, uris) - startActivity(Intent.createChooser(this, shareTitle)) + try { + startActivity(Intent.createChooser(this, shareTitle)) + } catch (e: TransactionTooLargeException) { + toast(R.string.maximum_share_reached) + } } }