Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions docs/maui/essentials/file-saver.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<Permissions.StorageRead>();
var writePermissionsRequest = await Permissions.RequestAsync<Permissions.StorageWrite>();
Comment on lines +81 to +85
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

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

The permission results are captured but not checked. Consider adding an example that demonstrates how to verify both permissions were granted before attempting to save files, improving the completeness of the documentation.

Suggested change
Developers must manually request Permissions.StorageRead and Permissions.StorageWrite:
```csharp
var readPermissionsRequest = await Permissions.RequestAsync<Permissions.StorageRead>();
var writePermissionsRequest = await Permissions.RequestAsync<Permissions.StorageWrite>();
Developers must manually request Permissions.StorageRead and Permissions.StorageWrite before saving files:
```csharp
async Task RequestStoragePermissionsAndSaveFile(CancellationToken cancellationToken)
{
var readPermissionStatus = await Permissions.RequestAsync<Permissions.StorageRead>();
var writePermissionStatus = await Permissions.RequestAsync<Permissions.StorageWrite>();
if (readPermissionStatus != PermissionStatus.Granted ||
writePermissionStatus != PermissionStatus.Granted)
{
await Toast
.Make("Storage permissions are required to save files.")
.Show(cancellationToken);
return;
}
await SaveFile(cancellationToken);
}

Copilot uses AI. Check for mistakes.
```

### Save file

```csharp
async Task SaveFile(CancellationToken cancellationToken)
Expand Down
14 changes: 11 additions & 3 deletions docs/maui/essentials/folder-picker.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<Permissions.StorageRead>();
```

### Pick folder

```csharp
async Task PickFolder(CancellationToken cancellationToken)
Expand Down
21 changes: 18 additions & 3 deletions docs/maui/essentials/speech-to-text.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,26 @@ Add permissions to `tizen-manifest.xml`:

---

## Syntax
## Basic usages
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

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

The heading uses 'usages' but should be 'usage' (singular) to be consistent with the other files in this PR (file-saver.md, folder-picker.md) and similar documentation files (camera-view.md uses 'Basic usage').

Suggested change
## Basic usages
## Basic usage

Copilot uses AI. Check for mistakes.

### 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():
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

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

The phrasing 'manually request permissions for Permissions.Microphone' is awkward because 'Permissions.Microphone' reads as a type rather than a permission category. Consider rephrasing to 'Developers must manually request Permissions.Microphone and also call ISpeechToText.RequestPermissions():' for better clarity.

Suggested change
Developers must manually request permissions for Permissions.Microphone and manually call ISpeechToText.RequestPermissions():
Developers must manually request Permissions.Microphone and also call ISpeechToText.RequestPermissions():

Copilot uses AI. Check for mistakes.

```csharp
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;
}
```

### Speech To Text

```csharp
async Task StartListening(CancellationToken cancellationToken)
Expand Down
34 changes: 34 additions & 0 deletions docs/maui/views/camera-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ The following permissions need to be added to the `Platforms/Android/AndroidMani
<uses-permission android:name="android.permission.CAMERA" />
```

In case you plan to record video, request Microphone permissions:
```xml
<uses-permission android:name="android.permission.RECORD_AUDIO" />
```

This should be added inside the `<manifest>` element. Below shows a more complete example:

```xml
Expand All @@ -34,6 +39,9 @@ This should be added inside the `<manifest>` element. Below shows a more complet

<uses-permission android:name="android.permission.CAMERA" />

<!--Optional. Only for video recording-->
<uses-permission android:name="android.permission.RECORD_AUDIO" />

</manifest>
```

Expand All @@ -46,6 +54,12 @@ The following entries need to be added to the `Platforms/iOS/Info.plist` file:
<string>PROVIDE YOUR REASON HERE</string>
```

In case you plan to record video, request Microphone permissions:
```xml
<key>NSMicrophoneUsageDescription</key>
<string>PROVIDE YOUR REASON HERE</string>
```

This should be added inside the `<dict>` element. Below shows a more complete example:

```xml
Expand Down Expand Up @@ -96,6 +110,12 @@ The following entries need to be added to the `Platforms/MacCatalyst/Info.plist`
<string>PROVIDE YOUR REASON HERE</string>
```

In case you plan to record video, request Microphone permissions:
```xml
<key>NSMicrophoneUsageDescription</key>
<string>PROVIDE YOUR REASON HERE</string>
```

This should be added inside the `<dict>` element. Below shows a more complete example:

```xml
Expand Down Expand Up @@ -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<Permissions.Camera>();
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

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

The variable captures the result of RequestAsync but the returned value is not used or checked. Consider adding guidance about checking the permission status, similar to the pattern shown in the SpeechToText example where the result is checked against PermissionStatus.Granted.

Copilot uses AI. Check for mistakes.
```

In case you plan to record video, request Microphone permissions:

```csharp
var microphonePermissionsRequest = await Permissions.RequestAsync<Permissions.Microphone>();
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

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

The variable captures the result of RequestAsync but the returned value is not used or checked. Consider adding guidance about checking the permission status or showing a complete example that demonstrates how to verify permissions were granted.

Copilot uses AI. Check for mistakes.
```

### Including the XAML namespace

[!INCLUDE [XAML usage guidance](../includes/xaml-usage.md)]
Expand Down
Loading