Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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>();
```

### Save file

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

```csharp
var readPermissionsRequest = await Permissions.RequestAsync<Permissions.StorageRead>();
var writePermissionsRequest = await Permissions.RequestAsync<Permissions.StorageWrite>();
```

StorageWrite permission is required in case you plan to write something in the folder.

### 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

### 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<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
13 changes: 13 additions & 0 deletions docs/maui/views/camera-view.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,19 @@ 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>();
var microphonePermissionsRequest = await Permissions.RequestAsync<Permissions.Microphone>();
```

Camera permission is always required.

Microphone Permission is required if you plan to use video recording.

### Including the XAML namespace

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