Repository navigation
[Android] Configure image drag support for BlazorWebView - #37975
Merged
kubaflo merged 4 commits intoSep 2, 2026
Merged
Conversation
danroth27
temporarily deployed
to
copilot-pat-pool
August 28, 2026 19:41 — with
GitHub Actions
Inactive
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 37975Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 37975" |
danroth27
temporarily deployed
to
copilot-pat-pool
August 28, 2026 19:41 — with
GitHub Actions
Inactive
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
danroth27
temporarily deployed
to
copilot-pat-pool
August 28, 2026 19:43 — with
GitHub Actions
Inactive
danroth27
temporarily deployed
to
copilot-pat-pool
August 28, 2026 19:45 — with
GitHub Actions
Inactive
danroth27
temporarily deployed
to
copilot-pat-pool
August 28, 2026 19:46 — with
GitHub Actions
Inactive
danroth27
temporarily deployed
to
copilot-pat-pool
August 28, 2026 19:46 — with
GitHub Actions
Inactive
This comment has been minimized.
This comment has been minimized.
MauiBot
reviewed
Aug 29, 2026
MauiBot
left a comment
Collaborator
There was a problem hiding this comment.
Expert Review — 5 findings
See inline comments for details.
This comment has been minimized.
This comment has been minimized.
MauiBot
reviewed
Aug 30, 2026
MauiBot
left a comment
Collaborator
There was a problem hiding this comment.
Expert Review — 7 findings
See inline comments for details.
kubaflo
requested changes
Aug 30, 2026
kubaflo
left a comment
Contributor
There was a problem hiding this comment.
Could you please check the ai's suggestions?
This comment has been minimized.
This comment has been minimized.
danroth27
marked this pull request as ready for review
August 31, 2026 23:34
Add runtime provider acquisition, default and opt-out manifest coverage, and an actionable warning for the legacy Android manifest merger. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep the review follow-up focused on the new drag-drop coverage without reformatting unrelated assertions. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Align WebKit with the rebased AndroidX Core 1.19 graph, make the legacy-merger warning suppressible, and rebuild the opt-out integration case from a clean obj directory. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
mattleibow
force-pushed
the
fix/37971-android-webview-drag-provider
branch
from
September 1, 2026 23:16
4955ce8 to
3a6309c
Compare
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The implementation matches the PR description, is scoped to BlazorWebView on Android, and includes both device and integration test coverage for the new manifest/provider behavior.
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 0 new
- Review effort level: Lite
Member
|
/azp run maui-pr |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
kubaflo
approved these changes
Sep 2, 2026
kubaflo
pushed a commit
that referenced
this pull request
Sep 3, 2026
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! Android WebView image dragging requires AndroidX WebKit's `DropDataContentProvider`. Without it, draggable images in a MAUI `BlazorWebView` produce DOM drag activity but no usable provider-backed image data. This change: - Adds the centrally versioned `Xamarin.AndroidX.WebKit` 1.16.0.1 dependency for Android MAUI BlazorWebView builds. This version matches main's AndroidX Core 1.19.0.1 dependency graph. - Registers `androidx.webkit.DropDataContentProvider` with the required `${applicationId}.DropDataProvider` authority. - Enables registration by default and lets apps that declare the provider themselves opt out with `<MauiEnableAndroidWebViewDragDrop>false</MauiEnableAndroidWebViewDragDrop>`. - Clarifies that the property controls automatic manifest registration only; the AndroidX dependency remains available for app-owned declarations. - Emits suppressible warning `MAUI1002` when `AndroidManifestMerger=legacy`, because that merger ignores `AndroidManifestOverlay` items. - Adds an Android device test that verifies the provider metadata, instantiates it through `ContentResolver`, and initializes its WebView bridge. - Adds a packaged-app integration test for both default registration and the opt-out merged manifest. Identical existing app declarations merge into one provider entry. Apps with a differing/custom declaration can disable MAUI's overlay with `MauiEnableAndroidWebViewDragDrop=false`. The provider remains scoped to `Microsoft.AspNetCore.Components.WebView.Maui` rather than `Microsoft.Maui.Core` so this fix does not add a WebKit dependency and manifest entry to every Android MAUI app. Plain `WebView` and `HybridWebView` can be considered separately if broader automatic registration is desired. Android Files may still reject dragging files out of the app with "You can't move files from another app"; that destination behavior is outside MAUI and is unchanged. No Appium UI test was added. The existing MAUI UI-test host has no BlazorWebView DOM-context support, and JavaScript-synthesized drag events would not exercise the native Android provider. The device and integration tests instead cover the provider's runtime and build-time contracts deterministically. - Rebased onto current `main` and aligned WebKit with the updated AndroidX dependency graph. - Confirmed `Xamarin.AndroidX.WebKit` 1.16.0.1 is available from `dotnet-public` and completed a fresh isolated restore. - Verified the default MSBuild evaluation includes the provider overlay and `MauiEnableAndroidWebViewDragDrop=false` omits it. - Verified an identical app-owned provider declaration merges to one provider entry. - Verified `AndroidManifestMerger=legacy` emits suppressible warning `MAUI1002`. - Ran the Android BlazorWebView device tests on a Pixel API 36 emulator before the rebase: 26 tests run, 22 passed, 4 ignored, 0 failed. `ImageDragDropContentProviderIsAvailable` passed. - Built the rebased integration-test project successfully. - Fixed the initial integration-test CI failure by rebuilding the opt-out case from a clean `obj` directory instead of changing `BaseIntermediateOutputPath`, which had caused both generated-source trees to be compiled. - Do not replace the AndroidX provider with a trivial managed `ContentProvider`; it bridges into Chromium's internal classloader implementation. - Do not vendor the WebKit AAR or add NuGet.org to MAUI's package sources. - Do not describe `MauiEnableAndroidWebViewDragDrop` as a dependency opt-out; NuGet dependencies are fixed when the package is built. Fixes #37971 --------- Co-authored-by: Matthew Leibowitz <mattleibow@live.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6ecbe107-8703-4352-a1c6-e4f722cb9b28
kubaflo
pushed a commit
that referenced
this pull request
Sep 6, 2026
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! Android WebView image dragging requires AndroidX WebKit's `DropDataContentProvider`. Without it, draggable images in a MAUI `BlazorWebView` produce DOM drag activity but no usable provider-backed image data. This change: - Adds the centrally versioned `Xamarin.AndroidX.WebKit` 1.16.0.1 dependency for Android MAUI BlazorWebView builds. This version matches main's AndroidX Core 1.19.0.1 dependency graph. - Registers `androidx.webkit.DropDataContentProvider` with the required `${applicationId}.DropDataProvider` authority. - Enables registration by default and lets apps that declare the provider themselves opt out with `<MauiEnableAndroidWebViewDragDrop>false</MauiEnableAndroidWebViewDragDrop>`. - Clarifies that the property controls automatic manifest registration only; the AndroidX dependency remains available for app-owned declarations. - Emits suppressible warning `MAUI1002` when `AndroidManifestMerger=legacy`, because that merger ignores `AndroidManifestOverlay` items. - Adds an Android device test that verifies the provider metadata, instantiates it through `ContentResolver`, and initializes its WebView bridge. - Adds a packaged-app integration test for both default registration and the opt-out merged manifest. Identical existing app declarations merge into one provider entry. Apps with a differing/custom declaration can disable MAUI's overlay with `MauiEnableAndroidWebViewDragDrop=false`. The provider remains scoped to `Microsoft.AspNetCore.Components.WebView.Maui` rather than `Microsoft.Maui.Core` so this fix does not add a WebKit dependency and manifest entry to every Android MAUI app. Plain `WebView` and `HybridWebView` can be considered separately if broader automatic registration is desired. Android Files may still reject dragging files out of the app with "You can't move files from another app"; that destination behavior is outside MAUI and is unchanged. No Appium UI test was added. The existing MAUI UI-test host has no BlazorWebView DOM-context support, and JavaScript-synthesized drag events would not exercise the native Android provider. The device and integration tests instead cover the provider's runtime and build-time contracts deterministically. - Rebased onto current `main` and aligned WebKit with the updated AndroidX dependency graph. - Confirmed `Xamarin.AndroidX.WebKit` 1.16.0.1 is available from `dotnet-public` and completed a fresh isolated restore. - Verified the default MSBuild evaluation includes the provider overlay and `MauiEnableAndroidWebViewDragDrop=false` omits it. - Verified an identical app-owned provider declaration merges to one provider entry. - Verified `AndroidManifestMerger=legacy` emits suppressible warning `MAUI1002`. - Ran the Android BlazorWebView device tests on a Pixel API 36 emulator before the rebase: 26 tests run, 22 passed, 4 ignored, 0 failed. `ImageDragDropContentProviderIsAvailable` passed. - Built the rebased integration-test project successfully. - Fixed the initial integration-test CI failure by rebuilding the opt-out case from a clean `obj` directory instead of changing `BaseIntermediateOutputPath`, which had caused both generated-source trees to be compiled. - Do not replace the AndroidX provider with a trivial managed `ContentProvider`; it bridges into Chromium's internal classloader implementation. - Do not vendor the WebKit AAR or add NuGet.org to MAUI's package sources. - Do not describe `MauiEnableAndroidWebViewDragDrop` as a dependency opt-out; NuGet dependencies are fixed when the package is built. Fixes #37971 --------- Co-authored-by: Matthew Leibowitz <mattleibow@live.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6ecbe107-8703-4352-a1c6-e4f722cb9b28
kubaflo
pushed a commit
that referenced
this pull request
Sep 7, 2026
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! Android WebView image dragging requires AndroidX WebKit's `DropDataContentProvider`. Without it, draggable images in a MAUI `BlazorWebView` produce DOM drag activity but no usable provider-backed image data. This change: - Adds the centrally versioned `Xamarin.AndroidX.WebKit` 1.16.0.1 dependency for Android MAUI BlazorWebView builds. This version matches main's AndroidX Core 1.19.0.1 dependency graph. - Registers `androidx.webkit.DropDataContentProvider` with the required `${applicationId}.DropDataProvider` authority. - Enables registration by default and lets apps that declare the provider themselves opt out with `<MauiEnableAndroidWebViewDragDrop>false</MauiEnableAndroidWebViewDragDrop>`. - Clarifies that the property controls automatic manifest registration only; the AndroidX dependency remains available for app-owned declarations. - Emits suppressible warning `MAUI1002` when `AndroidManifestMerger=legacy`, because that merger ignores `AndroidManifestOverlay` items. - Adds an Android device test that verifies the provider metadata, instantiates it through `ContentResolver`, and initializes its WebView bridge. - Adds a packaged-app integration test for both default registration and the opt-out merged manifest. Identical existing app declarations merge into one provider entry. Apps with a differing/custom declaration can disable MAUI's overlay with `MauiEnableAndroidWebViewDragDrop=false`. The provider remains scoped to `Microsoft.AspNetCore.Components.WebView.Maui` rather than `Microsoft.Maui.Core` so this fix does not add a WebKit dependency and manifest entry to every Android MAUI app. Plain `WebView` and `HybridWebView` can be considered separately if broader automatic registration is desired. Android Files may still reject dragging files out of the app with "You can't move files from another app"; that destination behavior is outside MAUI and is unchanged. No Appium UI test was added. The existing MAUI UI-test host has no BlazorWebView DOM-context support, and JavaScript-synthesized drag events would not exercise the native Android provider. The device and integration tests instead cover the provider's runtime and build-time contracts deterministically. - Rebased onto current `main` and aligned WebKit with the updated AndroidX dependency graph. - Confirmed `Xamarin.AndroidX.WebKit` 1.16.0.1 is available from `dotnet-public` and completed a fresh isolated restore. - Verified the default MSBuild evaluation includes the provider overlay and `MauiEnableAndroidWebViewDragDrop=false` omits it. - Verified an identical app-owned provider declaration merges to one provider entry. - Verified `AndroidManifestMerger=legacy` emits suppressible warning `MAUI1002`. - Ran the Android BlazorWebView device tests on a Pixel API 36 emulator before the rebase: 26 tests run, 22 passed, 4 ignored, 0 failed. `ImageDragDropContentProviderIsAvailable` passed. - Built the rebased integration-test project successfully. - Fixed the initial integration-test CI failure by rebuilding the opt-out case from a clean `obj` directory instead of changing `BaseIntermediateOutputPath`, which had caused both generated-source trees to be compiled. - Do not replace the AndroidX provider with a trivial managed `ContentProvider`; it bridges into Chromium's internal classloader implementation. - Do not vendor the WebKit AAR or add NuGet.org to MAUI's package sources. - Do not describe `MauiEnableAndroidWebViewDragDrop` as a dependency opt-out; NuGet dependencies are fixed when the package is built. Fixes #37971 --------- Co-authored-by: Matthew Leibowitz <mattleibow@live.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6ecbe107-8703-4352-a1c6-e4f722cb9b28
kubaflo
pushed a commit
that referenced
this pull request
Sep 8, 2026
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! Android WebView image dragging requires AndroidX WebKit's `DropDataContentProvider`. Without it, draggable images in a MAUI `BlazorWebView` produce DOM drag activity but no usable provider-backed image data. This change: - Adds the centrally versioned `Xamarin.AndroidX.WebKit` 1.16.0.1 dependency for Android MAUI BlazorWebView builds. This version matches main's AndroidX Core 1.19.0.1 dependency graph. - Registers `androidx.webkit.DropDataContentProvider` with the required `${applicationId}.DropDataProvider` authority. - Enables registration by default and lets apps that declare the provider themselves opt out with `<MauiEnableAndroidWebViewDragDrop>false</MauiEnableAndroidWebViewDragDrop>`. - Clarifies that the property controls automatic manifest registration only; the AndroidX dependency remains available for app-owned declarations. - Emits suppressible warning `MAUI1002` when `AndroidManifestMerger=legacy`, because that merger ignores `AndroidManifestOverlay` items. - Adds an Android device test that verifies the provider metadata, instantiates it through `ContentResolver`, and initializes its WebView bridge. - Adds a packaged-app integration test for both default registration and the opt-out merged manifest. Identical existing app declarations merge into one provider entry. Apps with a differing/custom declaration can disable MAUI's overlay with `MauiEnableAndroidWebViewDragDrop=false`. The provider remains scoped to `Microsoft.AspNetCore.Components.WebView.Maui` rather than `Microsoft.Maui.Core` so this fix does not add a WebKit dependency and manifest entry to every Android MAUI app. Plain `WebView` and `HybridWebView` can be considered separately if broader automatic registration is desired. Android Files may still reject dragging files out of the app with "You can't move files from another app"; that destination behavior is outside MAUI and is unchanged. No Appium UI test was added. The existing MAUI UI-test host has no BlazorWebView DOM-context support, and JavaScript-synthesized drag events would not exercise the native Android provider. The device and integration tests instead cover the provider's runtime and build-time contracts deterministically. - Rebased onto current `main` and aligned WebKit with the updated AndroidX dependency graph. - Confirmed `Xamarin.AndroidX.WebKit` 1.16.0.1 is available from `dotnet-public` and completed a fresh isolated restore. - Verified the default MSBuild evaluation includes the provider overlay and `MauiEnableAndroidWebViewDragDrop=false` omits it. - Verified an identical app-owned provider declaration merges to one provider entry. - Verified `AndroidManifestMerger=legacy` emits suppressible warning `MAUI1002`. - Ran the Android BlazorWebView device tests on a Pixel API 36 emulator before the rebase: 26 tests run, 22 passed, 4 ignored, 0 failed. `ImageDragDropContentProviderIsAvailable` passed. - Built the rebased integration-test project successfully. - Fixed the initial integration-test CI failure by rebuilding the opt-out case from a clean `obj` directory instead of changing `BaseIntermediateOutputPath`, which had caused both generated-source trees to be compiled. - Do not replace the AndroidX provider with a trivial managed `ContentProvider`; it bridges into Chromium's internal classloader implementation. - Do not vendor the WebKit AAR or add NuGet.org to MAUI's package sources. - Do not describe `MauiEnableAndroidWebViewDragDrop` as a dependency opt-out; NuGet dependencies are fixed when the package is built. Fixes #37971 --------- Co-authored-by: Matthew Leibowitz <mattleibow@live.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6ecbe107-8703-4352-a1c6-e4f722cb9b28
kubaflo
pushed a commit
that referenced
this pull request
Sep 9, 2026
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! Android WebView image dragging requires AndroidX WebKit's `DropDataContentProvider`. Without it, draggable images in a MAUI `BlazorWebView` produce DOM drag activity but no usable provider-backed image data. This change: - Adds the centrally versioned `Xamarin.AndroidX.WebKit` 1.16.0.1 dependency for Android MAUI BlazorWebView builds. This version matches main's AndroidX Core 1.19.0.1 dependency graph. - Registers `androidx.webkit.DropDataContentProvider` with the required `${applicationId}.DropDataProvider` authority. - Enables registration by default and lets apps that declare the provider themselves opt out with `<MauiEnableAndroidWebViewDragDrop>false</MauiEnableAndroidWebViewDragDrop>`. - Clarifies that the property controls automatic manifest registration only; the AndroidX dependency remains available for app-owned declarations. - Emits suppressible warning `MAUI1002` when `AndroidManifestMerger=legacy`, because that merger ignores `AndroidManifestOverlay` items. - Adds an Android device test that verifies the provider metadata, instantiates it through `ContentResolver`, and initializes its WebView bridge. - Adds a packaged-app integration test for both default registration and the opt-out merged manifest. Identical existing app declarations merge into one provider entry. Apps with a differing/custom declaration can disable MAUI's overlay with `MauiEnableAndroidWebViewDragDrop=false`. The provider remains scoped to `Microsoft.AspNetCore.Components.WebView.Maui` rather than `Microsoft.Maui.Core` so this fix does not add a WebKit dependency and manifest entry to every Android MAUI app. Plain `WebView` and `HybridWebView` can be considered separately if broader automatic registration is desired. Android Files may still reject dragging files out of the app with "You can't move files from another app"; that destination behavior is outside MAUI and is unchanged. No Appium UI test was added. The existing MAUI UI-test host has no BlazorWebView DOM-context support, and JavaScript-synthesized drag events would not exercise the native Android provider. The device and integration tests instead cover the provider's runtime and build-time contracts deterministically. - Rebased onto current `main` and aligned WebKit with the updated AndroidX dependency graph. - Confirmed `Xamarin.AndroidX.WebKit` 1.16.0.1 is available from `dotnet-public` and completed a fresh isolated restore. - Verified the default MSBuild evaluation includes the provider overlay and `MauiEnableAndroidWebViewDragDrop=false` omits it. - Verified an identical app-owned provider declaration merges to one provider entry. - Verified `AndroidManifestMerger=legacy` emits suppressible warning `MAUI1002`. - Ran the Android BlazorWebView device tests on a Pixel API 36 emulator before the rebase: 26 tests run, 22 passed, 4 ignored, 0 failed. `ImageDragDropContentProviderIsAvailable` passed. - Built the rebased integration-test project successfully. - Fixed the initial integration-test CI failure by rebuilding the opt-out case from a clean `obj` directory instead of changing `BaseIntermediateOutputPath`, which had caused both generated-source trees to be compiled. - Do not replace the AndroidX provider with a trivial managed `ContentProvider`; it bridges into Chromium's internal classloader implementation. - Do not vendor the WebKit AAR or add NuGet.org to MAUI's package sources. - Do not describe `MauiEnableAndroidWebViewDragDrop` as a dependency opt-out; NuGet dependencies are fixed when the package is built. Fixes #37971 --------- Co-authored-by: Matthew Leibowitz <mattleibow@live.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6ecbe107-8703-4352-a1c6-e4f722cb9b28
kubaflo
pushed a commit
that referenced
this pull request
Sep 11, 2026
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! Android WebView image dragging requires AndroidX WebKit's `DropDataContentProvider`. Without it, draggable images in a MAUI `BlazorWebView` produce DOM drag activity but no usable provider-backed image data. This change: - Adds the centrally versioned `Xamarin.AndroidX.WebKit` 1.16.0.1 dependency for Android MAUI BlazorWebView builds. This version matches main's AndroidX Core 1.19.0.1 dependency graph. - Registers `androidx.webkit.DropDataContentProvider` with the required `${applicationId}.DropDataProvider` authority. - Enables registration by default and lets apps that declare the provider themselves opt out with `<MauiEnableAndroidWebViewDragDrop>false</MauiEnableAndroidWebViewDragDrop>`. - Clarifies that the property controls automatic manifest registration only; the AndroidX dependency remains available for app-owned declarations. - Emits suppressible warning `MAUI1002` when `AndroidManifestMerger=legacy`, because that merger ignores `AndroidManifestOverlay` items. - Adds an Android device test that verifies the provider metadata, instantiates it through `ContentResolver`, and initializes its WebView bridge. - Adds a packaged-app integration test for both default registration and the opt-out merged manifest. Identical existing app declarations merge into one provider entry. Apps with a differing/custom declaration can disable MAUI's overlay with `MauiEnableAndroidWebViewDragDrop=false`. The provider remains scoped to `Microsoft.AspNetCore.Components.WebView.Maui` rather than `Microsoft.Maui.Core` so this fix does not add a WebKit dependency and manifest entry to every Android MAUI app. Plain `WebView` and `HybridWebView` can be considered separately if broader automatic registration is desired. Android Files may still reject dragging files out of the app with "You can't move files from another app"; that destination behavior is outside MAUI and is unchanged. No Appium UI test was added. The existing MAUI UI-test host has no BlazorWebView DOM-context support, and JavaScript-synthesized drag events would not exercise the native Android provider. The device and integration tests instead cover the provider's runtime and build-time contracts deterministically. - Rebased onto current `main` and aligned WebKit with the updated AndroidX dependency graph. - Confirmed `Xamarin.AndroidX.WebKit` 1.16.0.1 is available from `dotnet-public` and completed a fresh isolated restore. - Verified the default MSBuild evaluation includes the provider overlay and `MauiEnableAndroidWebViewDragDrop=false` omits it. - Verified an identical app-owned provider declaration merges to one provider entry. - Verified `AndroidManifestMerger=legacy` emits suppressible warning `MAUI1002`. - Ran the Android BlazorWebView device tests on a Pixel API 36 emulator before the rebase: 26 tests run, 22 passed, 4 ignored, 0 failed. `ImageDragDropContentProviderIsAvailable` passed. - Built the rebased integration-test project successfully. - Fixed the initial integration-test CI failure by rebuilding the opt-out case from a clean `obj` directory instead of changing `BaseIntermediateOutputPath`, which had caused both generated-source trees to be compiled. - Do not replace the AndroidX provider with a trivial managed `ContentProvider`; it bridges into Chromium's internal classloader implementation. - Do not vendor the WebKit AAR or add NuGet.org to MAUI's package sources. - Do not describe `MauiEnableAndroidWebViewDragDrop` as a dependency opt-out; NuGet dependencies are fixed when the package is built. Fixes #37971 --------- Co-authored-by: Matthew Leibowitz <mattleibow@live.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6ecbe107-8703-4352-a1c6-e4f722cb9b28
kubaflo
pushed a commit
that referenced
this pull request
Sep 15, 2026
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! Android WebView image dragging requires AndroidX WebKit's `DropDataContentProvider`. Without it, draggable images in a MAUI `BlazorWebView` produce DOM drag activity but no usable provider-backed image data. This change: - Adds the centrally versioned `Xamarin.AndroidX.WebKit` 1.16.0.1 dependency for Android MAUI BlazorWebView builds. This version matches main's AndroidX Core 1.19.0.1 dependency graph. - Registers `androidx.webkit.DropDataContentProvider` with the required `${applicationId}.DropDataProvider` authority. - Enables registration by default and lets apps that declare the provider themselves opt out with `<MauiEnableAndroidWebViewDragDrop>false</MauiEnableAndroidWebViewDragDrop>`. - Clarifies that the property controls automatic manifest registration only; the AndroidX dependency remains available for app-owned declarations. - Emits suppressible warning `MAUI1002` when `AndroidManifestMerger=legacy`, because that merger ignores `AndroidManifestOverlay` items. - Adds an Android device test that verifies the provider metadata, instantiates it through `ContentResolver`, and initializes its WebView bridge. - Adds a packaged-app integration test for both default registration and the opt-out merged manifest. Identical existing app declarations merge into one provider entry. Apps with a differing/custom declaration can disable MAUI's overlay with `MauiEnableAndroidWebViewDragDrop=false`. The provider remains scoped to `Microsoft.AspNetCore.Components.WebView.Maui` rather than `Microsoft.Maui.Core` so this fix does not add a WebKit dependency and manifest entry to every Android MAUI app. Plain `WebView` and `HybridWebView` can be considered separately if broader automatic registration is desired. Android Files may still reject dragging files out of the app with "You can't move files from another app"; that destination behavior is outside MAUI and is unchanged. No Appium UI test was added. The existing MAUI UI-test host has no BlazorWebView DOM-context support, and JavaScript-synthesized drag events would not exercise the native Android provider. The device and integration tests instead cover the provider's runtime and build-time contracts deterministically. - Rebased onto current `main` and aligned WebKit with the updated AndroidX dependency graph. - Confirmed `Xamarin.AndroidX.WebKit` 1.16.0.1 is available from `dotnet-public` and completed a fresh isolated restore. - Verified the default MSBuild evaluation includes the provider overlay and `MauiEnableAndroidWebViewDragDrop=false` omits it. - Verified an identical app-owned provider declaration merges to one provider entry. - Verified `AndroidManifestMerger=legacy` emits suppressible warning `MAUI1002`. - Ran the Android BlazorWebView device tests on a Pixel API 36 emulator before the rebase: 26 tests run, 22 passed, 4 ignored, 0 failed. `ImageDragDropContentProviderIsAvailable` passed. - Built the rebased integration-test project successfully. - Fixed the initial integration-test CI failure by rebuilding the opt-out case from a clean `obj` directory instead of changing `BaseIntermediateOutputPath`, which had caused both generated-source trees to be compiled. - Do not replace the AndroidX provider with a trivial managed `ContentProvider`; it bridges into Chromium's internal classloader implementation. - Do not vendor the WebKit AAR or add NuGet.org to MAUI's package sources. - Do not describe `MauiEnableAndroidWebViewDragDrop` as a dependency opt-out; NuGet dependencies are fixed when the package is built. Fixes #37971 --------- Co-authored-by: Matthew Leibowitz <mattleibow@live.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6ecbe107-8703-4352-a1c6-e4f722cb9b28
kubaflo
pushed a commit
that referenced
this pull request
Sep 18, 2026
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! Android WebView image dragging requires AndroidX WebKit's `DropDataContentProvider`. Without it, draggable images in a MAUI `BlazorWebView` produce DOM drag activity but no usable provider-backed image data. This change: - Adds the centrally versioned `Xamarin.AndroidX.WebKit` 1.16.0.1 dependency for Android MAUI BlazorWebView builds. This version matches main's AndroidX Core 1.19.0.1 dependency graph. - Registers `androidx.webkit.DropDataContentProvider` with the required `${applicationId}.DropDataProvider` authority. - Enables registration by default and lets apps that declare the provider themselves opt out with `<MauiEnableAndroidWebViewDragDrop>false</MauiEnableAndroidWebViewDragDrop>`. - Clarifies that the property controls automatic manifest registration only; the AndroidX dependency remains available for app-owned declarations. - Emits suppressible warning `MAUI1002` when `AndroidManifestMerger=legacy`, because that merger ignores `AndroidManifestOverlay` items. - Adds an Android device test that verifies the provider metadata, instantiates it through `ContentResolver`, and initializes its WebView bridge. - Adds a packaged-app integration test for both default registration and the opt-out merged manifest. Identical existing app declarations merge into one provider entry. Apps with a differing/custom declaration can disable MAUI's overlay with `MauiEnableAndroidWebViewDragDrop=false`. The provider remains scoped to `Microsoft.AspNetCore.Components.WebView.Maui` rather than `Microsoft.Maui.Core` so this fix does not add a WebKit dependency and manifest entry to every Android MAUI app. Plain `WebView` and `HybridWebView` can be considered separately if broader automatic registration is desired. Android Files may still reject dragging files out of the app with "You can't move files from another app"; that destination behavior is outside MAUI and is unchanged. No Appium UI test was added. The existing MAUI UI-test host has no BlazorWebView DOM-context support, and JavaScript-synthesized drag events would not exercise the native Android provider. The device and integration tests instead cover the provider's runtime and build-time contracts deterministically. - Rebased onto current `main` and aligned WebKit with the updated AndroidX dependency graph. - Confirmed `Xamarin.AndroidX.WebKit` 1.16.0.1 is available from `dotnet-public` and completed a fresh isolated restore. - Verified the default MSBuild evaluation includes the provider overlay and `MauiEnableAndroidWebViewDragDrop=false` omits it. - Verified an identical app-owned provider declaration merges to one provider entry. - Verified `AndroidManifestMerger=legacy` emits suppressible warning `MAUI1002`. - Ran the Android BlazorWebView device tests on a Pixel API 36 emulator before the rebase: 26 tests run, 22 passed, 4 ignored, 0 failed. `ImageDragDropContentProviderIsAvailable` passed. - Built the rebased integration-test project successfully. - Fixed the initial integration-test CI failure by rebuilding the opt-out case from a clean `obj` directory instead of changing `BaseIntermediateOutputPath`, which had caused both generated-source trees to be compiled. - Do not replace the AndroidX provider with a trivial managed `ContentProvider`; it bridges into Chromium's internal classloader implementation. - Do not vendor the WebKit AAR or add NuGet.org to MAUI's package sources. - Do not describe `MauiEnableAndroidWebViewDragDrop` as a dependency opt-out; NuGet dependencies are fixed when the package is built. Fixes #37971 --------- Co-authored-by: Matthew Leibowitz <mattleibow@live.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6ecbe107-8703-4352-a1c6-e4f722cb9b28
kubaflo
pushed a commit
that referenced
this pull request
Sep 21, 2026
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! Android WebView image dragging requires AndroidX WebKit's `DropDataContentProvider`. Without it, draggable images in a MAUI `BlazorWebView` produce DOM drag activity but no usable provider-backed image data. This change: - Adds the centrally versioned `Xamarin.AndroidX.WebKit` 1.16.0.1 dependency for Android MAUI BlazorWebView builds. This version matches main's AndroidX Core 1.19.0.1 dependency graph. - Registers `androidx.webkit.DropDataContentProvider` with the required `${applicationId}.DropDataProvider` authority. - Enables registration by default and lets apps that declare the provider themselves opt out with `<MauiEnableAndroidWebViewDragDrop>false</MauiEnableAndroidWebViewDragDrop>`. - Clarifies that the property controls automatic manifest registration only; the AndroidX dependency remains available for app-owned declarations. - Emits suppressible warning `MAUI1002` when `AndroidManifestMerger=legacy`, because that merger ignores `AndroidManifestOverlay` items. - Adds an Android device test that verifies the provider metadata, instantiates it through `ContentResolver`, and initializes its WebView bridge. - Adds a packaged-app integration test for both default registration and the opt-out merged manifest. Identical existing app declarations merge into one provider entry. Apps with a differing/custom declaration can disable MAUI's overlay with `MauiEnableAndroidWebViewDragDrop=false`. The provider remains scoped to `Microsoft.AspNetCore.Components.WebView.Maui` rather than `Microsoft.Maui.Core` so this fix does not add a WebKit dependency and manifest entry to every Android MAUI app. Plain `WebView` and `HybridWebView` can be considered separately if broader automatic registration is desired. Android Files may still reject dragging files out of the app with "You can't move files from another app"; that destination behavior is outside MAUI and is unchanged. No Appium UI test was added. The existing MAUI UI-test host has no BlazorWebView DOM-context support, and JavaScript-synthesized drag events would not exercise the native Android provider. The device and integration tests instead cover the provider's runtime and build-time contracts deterministically. - Rebased onto current `main` and aligned WebKit with the updated AndroidX dependency graph. - Confirmed `Xamarin.AndroidX.WebKit` 1.16.0.1 is available from `dotnet-public` and completed a fresh isolated restore. - Verified the default MSBuild evaluation includes the provider overlay and `MauiEnableAndroidWebViewDragDrop=false` omits it. - Verified an identical app-owned provider declaration merges to one provider entry. - Verified `AndroidManifestMerger=legacy` emits suppressible warning `MAUI1002`. - Ran the Android BlazorWebView device tests on a Pixel API 36 emulator before the rebase: 26 tests run, 22 passed, 4 ignored, 0 failed. `ImageDragDropContentProviderIsAvailable` passed. - Built the rebased integration-test project successfully. - Fixed the initial integration-test CI failure by rebuilding the opt-out case from a clean `obj` directory instead of changing `BaseIntermediateOutputPath`, which had caused both generated-source trees to be compiled. - Do not replace the AndroidX provider with a trivial managed `ContentProvider`; it bridges into Chromium's internal classloader implementation. - Do not vendor the WebKit AAR or add NuGet.org to MAUI's package sources. - Do not describe `MauiEnableAndroidWebViewDragDrop` as a dependency opt-out; NuGet dependencies are fixed when the package is built. Fixes #37971 --------- Co-authored-by: Matthew Leibowitz <mattleibow@live.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6ecbe107-8703-4352-a1c6-e4f722cb9b28
kubaflo
pushed a commit
that referenced
this pull request
Sep 27, 2026
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! Android WebView image dragging requires AndroidX WebKit's `DropDataContentProvider`. Without it, draggable images in a MAUI `BlazorWebView` produce DOM drag activity but no usable provider-backed image data. This change: - Adds the centrally versioned `Xamarin.AndroidX.WebKit` 1.16.0.1 dependency for Android MAUI BlazorWebView builds. This version matches main's AndroidX Core 1.19.0.1 dependency graph. - Registers `androidx.webkit.DropDataContentProvider` with the required `${applicationId}.DropDataProvider` authority. - Enables registration by default and lets apps that declare the provider themselves opt out with `<MauiEnableAndroidWebViewDragDrop>false</MauiEnableAndroidWebViewDragDrop>`. - Clarifies that the property controls automatic manifest registration only; the AndroidX dependency remains available for app-owned declarations. - Emits suppressible warning `MAUI1002` when `AndroidManifestMerger=legacy`, because that merger ignores `AndroidManifestOverlay` items. - Adds an Android device test that verifies the provider metadata, instantiates it through `ContentResolver`, and initializes its WebView bridge. - Adds a packaged-app integration test for both default registration and the opt-out merged manifest. Identical existing app declarations merge into one provider entry. Apps with a differing/custom declaration can disable MAUI's overlay with `MauiEnableAndroidWebViewDragDrop=false`. The provider remains scoped to `Microsoft.AspNetCore.Components.WebView.Maui` rather than `Microsoft.Maui.Core` so this fix does not add a WebKit dependency and manifest entry to every Android MAUI app. Plain `WebView` and `HybridWebView` can be considered separately if broader automatic registration is desired. Android Files may still reject dragging files out of the app with "You can't move files from another app"; that destination behavior is outside MAUI and is unchanged. No Appium UI test was added. The existing MAUI UI-test host has no BlazorWebView DOM-context support, and JavaScript-synthesized drag events would not exercise the native Android provider. The device and integration tests instead cover the provider's runtime and build-time contracts deterministically. - Rebased onto current `main` and aligned WebKit with the updated AndroidX dependency graph. - Confirmed `Xamarin.AndroidX.WebKit` 1.16.0.1 is available from `dotnet-public` and completed a fresh isolated restore. - Verified the default MSBuild evaluation includes the provider overlay and `MauiEnableAndroidWebViewDragDrop=false` omits it. - Verified an identical app-owned provider declaration merges to one provider entry. - Verified `AndroidManifestMerger=legacy` emits suppressible warning `MAUI1002`. - Ran the Android BlazorWebView device tests on a Pixel API 36 emulator before the rebase: 26 tests run, 22 passed, 4 ignored, 0 failed. `ImageDragDropContentProviderIsAvailable` passed. - Built the rebased integration-test project successfully. - Fixed the initial integration-test CI failure by rebuilding the opt-out case from a clean `obj` directory instead of changing `BaseIntermediateOutputPath`, which had caused both generated-source trees to be compiled. - Do not replace the AndroidX provider with a trivial managed `ContentProvider`; it bridges into Chromium's internal classloader implementation. - Do not vendor the WebKit AAR or add NuGet.org to MAUI's package sources. - Do not describe `MauiEnableAndroidWebViewDragDrop` as a dependency opt-out; NuGet dependencies are fixed when the package is built. Fixes #37971 --------- Co-authored-by: Matthew Leibowitz <mattleibow@live.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6ecbe107-8703-4352-a1c6-e4f722cb9b28
kubaflo
pushed a commit
that referenced
this pull request
Sep 27, 2026
<!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! Android WebView image dragging requires AndroidX WebKit's `DropDataContentProvider`. Without it, draggable images in a MAUI `BlazorWebView` produce DOM drag activity but no usable provider-backed image data. This change: - Adds the centrally versioned `Xamarin.AndroidX.WebKit` 1.16.0.1 dependency for Android MAUI BlazorWebView builds. This version matches main's AndroidX Core 1.19.0.1 dependency graph. - Registers `androidx.webkit.DropDataContentProvider` with the required `${applicationId}.DropDataProvider` authority. - Enables registration by default and lets apps that declare the provider themselves opt out with `<MauiEnableAndroidWebViewDragDrop>false</MauiEnableAndroidWebViewDragDrop>`. - Clarifies that the property controls automatic manifest registration only; the AndroidX dependency remains available for app-owned declarations. - Emits suppressible warning `MAUI1002` when `AndroidManifestMerger=legacy`, because that merger ignores `AndroidManifestOverlay` items. - Adds an Android device test that verifies the provider metadata, instantiates it through `ContentResolver`, and initializes its WebView bridge. - Adds a packaged-app integration test for both default registration and the opt-out merged manifest. Identical existing app declarations merge into one provider entry. Apps with a differing/custom declaration can disable MAUI's overlay with `MauiEnableAndroidWebViewDragDrop=false`. The provider remains scoped to `Microsoft.AspNetCore.Components.WebView.Maui` rather than `Microsoft.Maui.Core` so this fix does not add a WebKit dependency and manifest entry to every Android MAUI app. Plain `WebView` and `HybridWebView` can be considered separately if broader automatic registration is desired. Android Files may still reject dragging files out of the app with "You can't move files from another app"; that destination behavior is outside MAUI and is unchanged. No Appium UI test was added. The existing MAUI UI-test host has no BlazorWebView DOM-context support, and JavaScript-synthesized drag events would not exercise the native Android provider. The device and integration tests instead cover the provider's runtime and build-time contracts deterministically. - Rebased onto current `main` and aligned WebKit with the updated AndroidX dependency graph. - Confirmed `Xamarin.AndroidX.WebKit` 1.16.0.1 is available from `dotnet-public` and completed a fresh isolated restore. - Verified the default MSBuild evaluation includes the provider overlay and `MauiEnableAndroidWebViewDragDrop=false` omits it. - Verified an identical app-owned provider declaration merges to one provider entry. - Verified `AndroidManifestMerger=legacy` emits suppressible warning `MAUI1002`. - Ran the Android BlazorWebView device tests on a Pixel API 36 emulator before the rebase: 26 tests run, 22 passed, 4 ignored, 0 failed. `ImageDragDropContentProviderIsAvailable` passed. - Built the rebased integration-test project successfully. - Fixed the initial integration-test CI failure by rebuilding the opt-out case from a clean `obj` directory instead of changing `BaseIntermediateOutputPath`, which had caused both generated-source trees to be compiled. - Do not replace the AndroidX provider with a trivial managed `ContentProvider`; it bridges into Chromium's internal classloader implementation. - Do not vendor the WebKit AAR or add NuGet.org to MAUI's package sources. - Do not describe `MauiEnableAndroidWebViewDragDrop` as a dependency opt-out; NuGet dependencies are fixed when the package is built. Fixes #37971 --------- Co-authored-by: Matthew Leibowitz <mattleibow@live.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 6ecbe107-8703-4352-a1c6-e4f722cb9b28
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Description of Change
Android WebView image dragging requires AndroidX WebKit's
DropDataContentProvider. Without it, draggable images in a MAUIBlazorWebViewproduce DOM drag activity but no usable provider-backed image data.This change:
Xamarin.AndroidX.WebKit1.16.0.1 dependency for Android MAUI BlazorWebView builds. This version matches main's AndroidX Core 1.19.0.1 dependency graph.androidx.webkit.DropDataContentProviderwith the required${applicationId}.DropDataProviderauthority.<MauiEnableAndroidWebViewDragDrop>false</MauiEnableAndroidWebViewDragDrop>.MAUI1002whenAndroidManifestMerger=legacy, because that merger ignoresAndroidManifestOverlayitems.ContentResolver, and initializes its WebView bridge.Compatibility and Scope
Identical existing app declarations merge into one provider entry. Apps with a differing/custom declaration can disable MAUI's overlay with
MauiEnableAndroidWebViewDragDrop=false.The provider remains scoped to
Microsoft.AspNetCore.Components.WebView.Mauirather thanMicrosoft.Maui.Coreso this fix does not add a WebKit dependency and manifest entry to every Android MAUI app. PlainWebViewandHybridWebViewcan be considered separately if broader automatic registration is desired.Android Files may still reject dragging files out of the app with "You can't move files from another app"; that destination behavior is outside MAUI and is unchanged.
No Appium UI test was added. The existing MAUI UI-test host has no BlazorWebView DOM-context support, and JavaScript-synthesized drag events would not exercise the native Android provider. The device and integration tests instead cover the provider's runtime and build-time contracts deterministically.
Validation
mainand aligned WebKit with the updated AndroidX dependency graph.Xamarin.AndroidX.WebKit1.16.0.1 is available fromdotnet-publicand completed a fresh isolated restore.MauiEnableAndroidWebViewDragDrop=falseomits it.AndroidManifestMerger=legacyemits suppressible warningMAUI1002.ImageDragDropContentProviderIsAvailablepassed.objdirectory instead of changingBaseIntermediateOutputPath, which had caused both generated-source trees to be compiled.What Not to Do
ContentProvider; it bridges into Chromium's internal classloader implementation.MauiEnableAndroidWebViewDragDropas a dependency opt-out; NuGet dependencies are fixed when the package is built.Fixes #37971