From 9714a30148d89a78ea2b3901e1053972c736f4d6 Mon Sep 17 00:00:00 2001 From: inorichi Date: Sat, 4 Nov 2017 18:05:02 +0100 Subject: [PATCH] Share image with both setData and extra stream intent --- .../main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt index 3e4e3ebf3..1815a07d1 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt @@ -575,9 +575,9 @@ class ReaderActivity : BaseRxActivity() { uri = File(uri.toString().substringAfter("file://")).getUriCompat(this) } val intent = Intent(Intent.ACTION_SEND).apply { + setDataAndType(uri, "image/*") putExtra(Intent.EXTRA_STREAM, uri) flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_GRANT_READ_URI_PERMISSION - type = "image/*" } startActivity(Intent.createChooser(intent, getString(R.string.action_share))) }