-
Couldn't load subscription status.
- Fork 1.9k
[Essentials] Add microphone permission handling on Windows and tests #31451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 Windows platform support for microphone permission handling in .NET MAUI Essentials, addressing an issue where permission status was incorrectly returned as Granted even after denial. The implementation provides proper checking and requesting of microphone access permissions on Windows.
Key changes:
- Implements Windows-specific microphone permission checking and requesting logic
- Adds comprehensive device tests for microphone permissions with human interaction scenarios
- Updates platform manifest files to declare required microphone permissions
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/Essentials/src/Permissions/Permissions.windows.cs |
Implements microphone permission logic for Windows using MediaCapture and DeviceAccessInformation APIs |
src/Essentials/test/DeviceTests/Tests/Microphone_Tests.cs |
Adds comprehensive device tests for microphone permission denied/granted scenarios |
src/Essentials/src/PublicAPI/net-windows/PublicAPI.Unshipped.txt |
Documents new public API methods for Windows microphone permissions |
| Platform manifest files (iOS, MacCatalyst, Android, Windows) | Adds microphone permission declarations across all supported platforms |
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
This pull request adds support for microphone permission handling on Windows, including the ability to check and request microphone access. It also introduces corresponding tests and updates platform-specific manifest files to declare microphone permissions, ensuring proper functionality and compliance across Windows, Android, iOS, and MacCatalyst.
Issues Fixed
In a popup summoned by Permissions.RequestAsync<Permissions.Microphone>() I denied the permission. Now every call to Permissions.RequestAsync<Permissions.Microphone> or Permissions.CheckStatusAsync<Permissions.Microphone> returns Granted.
Tests
Fixes #31413