MOBILEWEBVIEW-100: Add permission request for jsbridge#694
Merged
enotniy merged 4 commits intomission/webview-inappfrom Mar 19, 2026
Merged
MOBILEWEBVIEW-100: Add permission request for jsbridge#694enotniy merged 4 commits intomission/webview-inappfrom
enotniy merged 4 commits intomission/webview-inappfrom
Conversation
6f36d5b to
6b1d579
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds a WebView JS-bridge action to request Android runtime permissions from in-app WebView creatives, including a dedicated transparent activity/bridge to execute permission prompts and return results back to the WebView layer.
Changes:
- Introduces
permission.requestWebView action handling and permission request orchestration (WebViewPermissionRequester). - Adds
RuntimePermissionRequestActivity+RuntimePermissionRequestBridgeto perform runtime permission prompts and deliver async results. - Adds unit tests for permission requester behavior and Gson serialization; updates transparent theme attributes and a test mock setup.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/src/test/java/cloud/mindbox/mobile_sdk/utils/MigrationManagerTest.kt | Adjusts DI mocking for appModule.gson setup. |
| sdk/src/test/java/cloud/mindbox/mobile_sdk/inapp/presentation/view/WebViewPermissionRequesterTest.kt | Adds unit tests for permission request decision logic. |
| sdk/src/test/java/cloud/mindbox/mobile_sdk/inapp/presentation/view/WebViewPermissionBridgeSerializationTest.kt | Adds serialization/deserialization coverage for permission bridge payloads/actions. |
| sdk/src/main/res/values/strings.xml | Updates Theme.MindboxTransparent window attributes. |
| sdk/src/main/java/cloud/mindbox/mobile_sdk/inapp/presentation/view/WebViewPermissionRequester.kt | Implements permission type mapping, manifest checks, and runtime request launching. |
| sdk/src/main/java/cloud/mindbox/mobile_sdk/inapp/presentation/view/WebViewInappViewHolder.kt | Registers/handles new permission.request action and returns JSON result to WebView. |
| sdk/src/main/java/cloud/mindbox/mobile_sdk/inapp/presentation/view/WebViewAction.kt | Adds PERMISSION_REQUEST action (permission.request). |
| sdk/src/main/java/cloud/mindbox/mobile_sdk/inapp/presentation/actions/RuntimePermissionRequestBridge.kt | Adds concurrent map bridge for pending permission requests keyed by requestId. |
| sdk/src/main/java/cloud/mindbox/mobile_sdk/inapp/presentation/actions/RuntimePermissionRequestActivity.kt | Adds transparent activity that triggers requestPermissions and resolves bridge result. |
| sdk/src/main/AndroidManifest.xml | Registers RuntimePermissionRequestActivity with transparent theme and non-exported settings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...java/cloud/mindbox/mobile_sdk/inapp/presentation/actions/RuntimePermissionRequestActivity.kt
Outdated
Show resolved
Hide resolved
...java/cloud/mindbox/mobile_sdk/inapp/presentation/actions/RuntimePermissionRequestActivity.kt
Show resolved
Hide resolved
...src/main/java/cloud/mindbox/mobile_sdk/inapp/presentation/view/WebViewPermissionRequester.kt
Show resolved
Hide resolved
sdk/src/main/java/cloud/mindbox/mobile_sdk/inapp/presentation/view/WebViewInappViewHolder.kt
Show resolved
Hide resolved
...java/cloud/mindbox/mobile_sdk/inapp/presentation/actions/RuntimePermissionRequestActivity.kt
Outdated
Show resolved
Hide resolved
...n/java/cloud/mindbox/mobile_sdk/inapp/presentation/actions/RuntimePermissionRequestBridge.kt
Outdated
Show resolved
Hide resolved
...src/main/java/cloud/mindbox/mobile_sdk/inapp/presentation/view/WebViewPermissionRequester.kt
Show resolved
Hide resolved
sergeysozinov
approved these changes
Mar 18, 2026
f067266 to
717826d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://tracker.yandex.ru/MOBILEWEBVIEW-100