Allow Developers to Manually Request Permissions when using CameraView, FileSaver, FolderPicker and SpeechToText#2934
Merged
TheCodeTraveler merged 11 commits intomainfrom Nov 11, 2025
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR removes automatic permission checking from internal implementation methods and shifts responsibility for permission handling to the consuming application layer. This architectural change allows developers to have more control over when and how they request permissions from users.
Key changes:
- Removed automatic permission checks from
StartListenAsyncmethods in speech-to-text implementations - Removed internal
IsSpeechPermissionAuthorizedhelper methods - Removed automatic permission checks from file system operations (FileSaver, FolderPicker) on Android and Tizen
- Removed
ArePermissionsGrantedmethod from CameraManager - Updated sample apps to explicitly request permissions before using these features
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| SpeechToTextImplementation.shared.cs | Removed automatic microphone permission check from StartListenAsync and deleted IsSpeechPermissionAuthorized helper method |
| SharedSpeechToTextImplementation.macios.cs | Removed macOS/iOS-specific IsSpeechPermissionAuthorized helper method |
| OfflineSpeechToTextImplementation.shared.cs | Removed automatic microphone permission check from offline speech recognition's StartListenAsync |
| FolderPickerImplementation.tizen.cs | Removed automatic storage permission request from Tizen folder picker |
| FolderPickerImplementation.android.cs | Removed automatic storage permission request for Android versions below 33 |
| FileSaverImplementation.tizen.cs | Removed automatic storage permission request from Tizen file saver |
| FileSaverImplementation.android.cs | Removed automatic storage permission request for Android versions below 33 |
| CameraViewHandler.shared.cs | Removed automatic permission check before connecting camera |
| CameraManager.shared.cs | Removed ArePermissionsGranted public method entirely |
| SpeechToTextViewModel.cs | Added RequestPermissions method to request both microphone and speech recognition permissions |
| OfflineSpeechToTextViewModel.cs | Added RequestPermissions method to request both microphone and speech recognition permissions |
| FolderPickerViewModel.cs | Added RequestPermissions method to request storage permissions before each operation |
| FileSaverViewModel.cs | Added RequestPermissions method to request storage permissions before each operation |
| CameraViewPage.xaml.cs | Added permission requests in OnAppearing and SaveVideo methods |
samples/CommunityToolkit.Maui.Sample/ViewModels/Essentials/OfflineSpeechToTextViewModel.cs
Outdated
Show resolved
Hide resolved
samples/CommunityToolkit.Maui.Sample/ViewModels/Essentials/FolderPickerViewModel.cs
Outdated
Show resolved
Hide resolved
samples/CommunityToolkit.Maui.Sample/ViewModels/Essentials/FileSaverViewModel.cs
Outdated
Show resolved
Hide resolved
samples/CommunityToolkit.Maui.Sample/Pages/Views/CameraView/CameraViewPage.xaml.cs
Outdated
Show resolved
Hide resolved
samples/CommunityToolkit.Maui.Sample/Pages/Views/CameraView/CameraViewPage.xaml.cs
Outdated
Show resolved
Hide resolved
src/CommunityToolkit.Maui.Core/Essentials/FileSaver/FileSaverImplementation.android.cs
Outdated
Show resolved
Hide resolved
samples/CommunityToolkit.Maui.Sample/ViewModels/Essentials/SpeechToTextViewModel.cs
Outdated
Show resolved
Hide resolved
samples/CommunityToolkit.Maui.Sample/ViewModels/Essentials/FolderPickerViewModel.cs
Outdated
Show resolved
Hide resolved
samples/CommunityToolkit.Maui.Sample/ViewModels/Essentials/FolderPickerViewModel.cs
Outdated
Show resolved
Hide resolved
samples/CommunityToolkit.Maui.Sample/ViewModels/Essentials/FolderPickerViewModel.cs
Outdated
Show resolved
Hide resolved
samples/CommunityToolkit.Maui.Sample/ViewModels/Essentials/FolderPickerViewModel.cs
Outdated
Show resolved
Hide resolved
samples/CommunityToolkit.Maui.Sample/ViewModels/Essentials/FolderPickerViewModel.cs
Outdated
Show resolved
Hide resolved
samples/CommunityToolkit.Maui.Sample/ViewModels/Essentials/FileSaverViewModel.cs
Outdated
Show resolved
Hide resolved
samples/CommunityToolkit.Maui.Sample/ViewModels/Essentials/FileSaverViewModel.cs
Outdated
Show resolved
Hide resolved
samples/CommunityToolkit.Maui.Sample/Pages/Views/CameraView/CameraViewPage.xaml.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
TheCodeTraveler
approved these changes
Nov 11, 2025
Collaborator
TheCodeTraveler
left a comment
There was a problem hiding this comment.
Thanks Vlad!! Could you please open a Docs PR updating users that they need to manually request permissions on the following platforms and provide examples in the docs:
- CameraView
- FileSaver
- FolderPicker
- SpeechToText
CameraView, FileSaver, FolderPicker and SpeechToText
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.
Description of Change
Linked Issues
PR Checklist
approved(bug) orChampioned(feature/proposal)mainat time of PRBreaking Changes
Permissions.CameraandPermissions.Microphone:Permissions.StorageReadandPermissions.StorageWrite:Permissions.StorageReadandPermissions.StorageWrite:Permissions.Microphoneand manually callISpeechToText.RequestPermissions():