From 9e70f41597c3904f4806bbea4ef8c440c509c28b Mon Sep 17 00:00:00 2001 From: Alexandre Jacinto Date: Fri, 3 Jul 2026 16:36:05 -0400 Subject: [PATCH 1/2] fix: explicitly grant URI permissions for photo/video capture intents Android 18 removes automatic URI permission grants for ACTION_IMAGE_CAPTURE (and similarly affects ACTION_VIDEO_CAPTURE) intents. The file chooser's takePictureIntent and takeVideoIntent sent no grant flags for their FileProvider output URIs. RMET-5241 --- .../osinappbrowserlib/views/OSIABWebViewActivity.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com.outsystems.plugins.inappbrowser/osinappbrowserlib/views/OSIABWebViewActivity.kt b/src/main/java/com.outsystems.plugins.inappbrowser/osinappbrowserlib/views/OSIABWebViewActivity.kt index b6b4e01..957934e 100644 --- a/src/main/java/com.outsystems.plugins.inappbrowser/osinappbrowserlib/views/OSIABWebViewActivity.kt +++ b/src/main/java/com.outsystems.plugins.inappbrowser/osinappbrowserlib/views/OSIABWebViewActivity.kt @@ -732,6 +732,7 @@ open class OSIABWebViewActivity : AppCompatActivity() { } val takePictureIntent = Intent(MediaStore.ACTION_IMAGE_CAPTURE).apply { putExtra(MediaStore.EXTRA_OUTPUT, currentPhotoUri) + addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION or Intent.FLAG_GRANT_WRITE_URI_PERMISSION) } intentList.add(takePictureIntent) } @@ -746,6 +747,7 @@ open class OSIABWebViewActivity : AppCompatActivity() { } val takeVideoIntent = Intent(MediaStore.ACTION_VIDEO_CAPTURE).apply { putExtra(MediaStore.EXTRA_OUTPUT, currentVideoUri) + addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION or Intent.FLAG_GRANT_WRITE_URI_PERMISSION) } intentList.add(takeVideoIntent) } From 7fdf00251c293bc94f56f1f4d2134e132637361f Mon Sep 17 00:00:00 2001 From: Alexandre Jacinto Date: Tue, 7 Jul 2026 10:30:52 -0400 Subject: [PATCH 2/2] chore: bump version to 2.0.1 RMET-5241 --- CHANGELOG.md | 6 ++++++ pom.xml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b427a3c..a5d9814 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [2.0.1] + +### Fixes + +- Explicitly grant `FLAG_GRANT_READ_URI_PERMISSION` and `FLAG_GRANT_WRITE_URI_PERMISSION` when launching the photo/video capture intents from the WebView file chooser, required for Android 18's implicit URI grant restriction ([RMET-5241](https://outsystemsrd.atlassian.net/browse/RMET-5241)). + ## [2.0.0] ### Fixes diff --git a/pom.xml b/pom.xml index 708eb5b..9a5c641 100644 --- a/pom.xml +++ b/pom.xml @@ -6,5 +6,5 @@ 4.0.0 io.ionic.libs ioninappbrowser-android - 2.0.0 + 2.0.1