Skip to content

MOBILEWEBVIEW-100: Add permission request for jsbridge#694

Merged
enotniy merged 4 commits intomission/webview-inappfrom
feature/MOBILEWEBVIEW-100
Mar 19, 2026
Merged

MOBILEWEBVIEW-100: Add permission request for jsbridge#694
enotniy merged 4 commits intomission/webview-inappfrom
feature/MOBILEWEBVIEW-100

Conversation

@enotniy
Copy link
Collaborator

@enotniy enotniy commented Mar 18, 2026

@enotniy enotniy force-pushed the feature/MOBILEWEBVIEW-100 branch from 6f36d5b to 6b1d579 Compare March 18, 2026 08:59
@sergeysozinov sergeysozinov requested a review from Copilot March 18, 2026 10:42
@enotniy enotniy review requested due to automatic review settings March 18, 2026 10:42
@sergeysozinov sergeysozinov requested a review from Copilot March 18, 2026 11:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.request WebView action handling and permission request orchestration (WebViewPermissionRequester).
  • Adds RuntimePermissionRequestActivity + RuntimePermissionRequestBridge to 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.

@enotniy enotniy requested a review from sergeysozinov March 18, 2026 13:20
@enotniy enotniy force-pushed the feature/MOBILEWEBVIEW-100 branch from f067266 to 717826d Compare March 18, 2026 14:15
@enotniy enotniy merged commit 84ef639 into mission/webview-inapp Mar 19, 2026
4 checks passed
@enotniy enotniy deleted the feature/MOBILEWEBVIEW-100 branch March 19, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants