From 7111a87f8f163088019a1026ae3ef028fadadc8b Mon Sep 17 00:00:00 2001 From: Azuma Kasumi Date: Wed, 24 May 2023 18:01:00 +0900 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E4=BB=98=E3=83=95=E3=82=A1=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E8=A4=87=E6=95=B0=E9=81=B8=E6=8A=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../view/ui/documentweb/DocumentWebDownload.kt | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/jp/atled/agileworks/view/ui/documentweb/DocumentWebDownload.kt b/app/src/main/java/jp/atled/agileworks/view/ui/documentweb/DocumentWebDownload.kt index 92c564e0..9f6d385b 100644 --- a/app/src/main/java/jp/atled/agileworks/view/ui/documentweb/DocumentWebDownload.kt +++ b/app/src/main/java/jp/atled/agileworks/view/ui/documentweb/DocumentWebDownload.kt @@ -63,7 +63,18 @@ class DocumentWebDownloader(private val handlingFragment: Fragment, private val */ fun handleFileChooseResult(resultCode: Int, data: Intent?) { filePathCallback?.let { - val uris = WebChromeClient.FileChooserParams.parseResult(resultCode, data) + val clipdata = data?.clipData + var uris = WebChromeClient.FileChooserParams.parseResult(resultCode, data) + + if (clipdata != null) { + var uriList: MutableList = mutableListOf() + val loopcount = clipdata.itemCount - 1 + for (i in 0..loopcount) { + uriList.add(clipdata.getItemAt(i).uri) + } + uris = uriList.toTypedArray() + } + it.onReceiveValue(uris) } filePathCallback = null -- GitLab