Skip to content

Conversation

@VladislavAntonyuk
Copy link
Collaborator

@VladislavAntonyuk VladislavAntonyuk commented Nov 7, 2025

Description of Change

Linked Issues

PR Checklist

Breaking Changes

  • (CameraView) Developers must manually request Permissions.Camera and Permissions.Microphone:
var cameraPermissionsRequest = await Permissions.RequestAsync<Permissions.Camera>();
var microphonePermissionsRequest = await Permissions.RequestAsync<Permissions.Microphone>();
  • (FileSaver) Developers must manually request Permissions.StorageRead and Permissions.StorageWrite:
var readPermissionStatus = await Permissions.RequestAsync<Permissions.StorageRead>();
var writePermissionStatus = await Permissions.RequestAsync<Permissions.StorageWrite>();
  • (FolderPicker) Developers must manually request Permissions.StorageRead and Permissions.StorageWrite:
var readPermissionStatus = await Permissions.RequestAsync<Permissions.StorageRead>();
var writePermissionStatus = await Permissions.RequestAsync<Permissions.StorageWrite>();
  • (SpeechToText) Developers must manually request permissions for Permissions.Microphone and manually call ISpeechToText.RequestPermissions():
    static async Task<bool> ArePermissionsGranted(ISpeechToText speechToText)
    {
        var microphonePermissionStatus = await Permissions.RequestAsync<Permissions.Microphone>();
        var isSpeechToTextRequestPermissionsGranted = await speechToText.RequestPermissions(CancellationToken.None);

        return microphonePermissionStatus is PermissionStatus.Granted
               && isSpeechToTextRequestPermissionsGranted;
    }

@VladislavAntonyuk VladislavAntonyuk requested review from a team and Copilot November 7, 2025 14:15
@VladislavAntonyuk VladislavAntonyuk self-assigned this Nov 7, 2025
Copy link
Contributor

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 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 StartListenAsync methods in speech-to-text implementations
  • Removed internal IsSpeechPermissionAuthorized helper methods
  • Removed automatic permission checks from file system operations (FileSaver, FolderPicker) on Android and Tizen
  • Removed ArePermissionsGranted method 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

Copy link
Contributor

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

Copilot reviewed 15 out of 15 changed files in this pull request and generated 14 comments.

Copilot AI review requested due to automatic review settings November 11, 2025 18:19
Copy link
Contributor

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@TheCodeTraveler TheCodeTraveler added the pending documentation This feature requires documentation label Nov 11, 2025
Copilot AI review requested due to automatic review settings November 11, 2025 18:26
Copy link
Contributor

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI review requested due to automatic review settings November 11, 2025 18:29
Copy link
Contributor

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Collaborator

@TheCodeTraveler TheCodeTraveler left a comment

Choose a reason for hiding this comment

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

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

@TheCodeTraveler TheCodeTraveler changed the title Remove permissions from the library Allow Developers to Manually Request Permissions when using CameraView, FileSaver, FolderPicker and SpeechToText Nov 11, 2025
@TheCodeTraveler TheCodeTraveler enabled auto-merge (squash) November 11, 2025 18:38
@TheCodeTraveler TheCodeTraveler merged commit 3cbcf04 into main Nov 11, 2025
9 of 11 checks passed
@TheCodeTraveler TheCodeTraveler deleted the bugfix/2930-remove-permissions branch November 11, 2025 18:47
@github-actions github-actions bot locked and limited conversation to collaborators Nov 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

pending documentation This feature requires documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] iOS app crash due to forced Microphone permission request

2 participants