diff --git a/docs/maui/essentials/file-saver.md b/docs/maui/essentials/file-saver.md index 48815aab..db137b4c 100644 --- a/docs/maui/essentials/file-saver.md +++ b/docs/maui/essentials/file-saver.md @@ -72,11 +72,20 @@ Add permissions to `tizen-manifest.xml`: --- -## Syntax +## Basic usage -### C# +The `FileSaver` can be added to a .NET MAUI application in the following way. -The `FileSaver` can be used as follows in C#: +### Request permissions + +Developers must manually request Permissions.StorageRead and Permissions.StorageWrite: + +```csharp +var readPermissionsRequest = await Permissions.RequestAsync(); +var writePermissionsRequest = await Permissions.RequestAsync(); +``` + +### Save file ```csharp async Task SaveFile(CancellationToken cancellationToken) diff --git a/docs/maui/essentials/folder-picker.md b/docs/maui/essentials/folder-picker.md index 85598cae..4186d73c 100644 --- a/docs/maui/essentials/folder-picker.md +++ b/docs/maui/essentials/folder-picker.md @@ -65,11 +65,19 @@ Add permissions to `tizen-manifest.xml`: --- -## Syntax +## Basic usage -### C# +The `FolderPicker` can be added to a .NET MAUI application in the following way. -The `FolderPicker` can be used as follows in C#: +### Request permissions + +Developers must manually request Permissions.StorageRead: + +```csharp +var readPermissionsRequest = await Permissions.RequestAsync(); +``` + +### Pick folder ```csharp async Task PickFolder(CancellationToken cancellationToken) diff --git a/docs/maui/essentials/speech-to-text.md b/docs/maui/essentials/speech-to-text.md index 999f2c75..3b8c16fe 100644 --- a/docs/maui/essentials/speech-to-text.md +++ b/docs/maui/essentials/speech-to-text.md @@ -55,11 +55,26 @@ Add permissions to `tizen-manifest.xml`: --- -## Syntax +## Basic usages -### C# +The `SpeechToText` can be added to a .NET MAUI application in the following way. -The `SpeechToText` can be used as follows in C#: +### Request permissions + +Developers must manually request permissions for Permissions.Microphone and manually call ISpeechToText.RequestPermissions(): + +```csharp +static async Task ArePermissionsGranted(ISpeechToText speechToText) +{ + var microphonePermissionStatus = await Permissions.RequestAsync(); + var isSpeechToTextRequestPermissionsGranted = await speechToText.RequestPermissions(CancellationToken.None); + + return microphonePermissionStatus is PermissionStatus.Granted + && isSpeechToTextRequestPermissionsGranted; +} +``` + +### Speech To Text ```csharp async Task StartListening(CancellationToken cancellationToken) diff --git a/docs/maui/views/camera-view.md b/docs/maui/views/camera-view.md index b94482c3..c8943323 100644 --- a/docs/maui/views/camera-view.md +++ b/docs/maui/views/camera-view.md @@ -25,6 +25,11 @@ The following permissions need to be added to the `Platforms/Android/AndroidMani ``` +In case you plan to record video, request Microphone permissions: +```xml + +``` + This should be added inside the `` element. Below shows a more complete example: ```xml @@ -34,6 +39,9 @@ This should be added inside the `` element. Below shows a more complet + + + ``` @@ -46,6 +54,12 @@ The following entries need to be added to the `Platforms/iOS/Info.plist` file: PROVIDE YOUR REASON HERE ``` +In case you plan to record video, request Microphone permissions: +```xml +NSMicrophoneUsageDescription +PROVIDE YOUR REASON HERE +``` + This should be added inside the `` element. Below shows a more complete example: ```xml @@ -96,6 +110,12 @@ The following entries need to be added to the `Platforms/MacCatalyst/Info.plist` PROVIDE YOUR REASON HERE ``` +In case you plan to record video, request Microphone permissions: +```xml +NSMicrophoneUsageDescription +PROVIDE YOUR REASON HERE +``` + This should be added inside the `` element. Below shows a more complete example: ```xml @@ -155,6 +175,20 @@ Tizen is not currently supported. The `CameraView` can be added to a .NET MAUI application in the following way. +### Request permissions + +Developers must manually request Permissions.Camera and/or Permissions.Microphone: + +```csharp +var cameraPermissionsRequest = await Permissions.RequestAsync(); +``` + +In case you plan to record video, request Microphone permissions: + +```csharp +var microphonePermissionsRequest = await Permissions.RequestAsync(); +``` + ### Including the XAML namespace [!INCLUDE [XAML usage guidance](../includes/xaml-usage.md)]