Skip to content

Commit a6d2eb8

Browse files
update docs to split required and optional permissions
1 parent 86932e6 commit a6d2eb8

2 files changed

Lines changed: 25 additions & 7 deletions

File tree

docs/maui/essentials/folder-picker.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,12 @@ The `FolderPicker` can be added to a .NET MAUI application in the following way.
7171

7272
### Request permissions
7373

74-
Developers must manually request Permissions.StorageRead and/or Permissions.StorageWrite:
74+
Developers must manually request Permissions.StorageRead:
7575

7676
```csharp
7777
var readPermissionsRequest = await Permissions.RequestAsync<Permissions.StorageRead>();
78-
var writePermissionsRequest = await Permissions.RequestAsync<Permissions.StorageWrite>();
7978
```
8079

81-
StorageWrite permission is required in case you plan to write something in the folder.
82-
8380
### Pick folder
8481

8582
```csharp

docs/maui/views/camera-view.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ The following permissions need to be added to the `Platforms/Android/AndroidMani
2525
<uses-permission android:name="android.permission.CAMERA" />
2626
```
2727

28+
In case you plan to record video, request Microphone permissions:
29+
```xml
30+
<uses-permission android:name="android.permission.RECORD_AUDIO" />
31+
```
32+
2833
This should be added inside the `<manifest>` element. Below shows a more complete example:
2934

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

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

42+
<!--Optional. Only for video recording-->
43+
<uses-permission android:name="android.permission.RECORD_AUDIO" />
44+
3745
</manifest>
3846
```
3947

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

57+
In case you plan to record video, request Microphone permissions:
58+
```xml
59+
<key>NSMicrophoneUsageDescription</key>
60+
<string>PROVIDE YOUR REASON HERE</string>
61+
```
62+
4963
This should be added inside the `<dict>` element. Below shows a more complete example:
5064

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

113+
In case you plan to record video, request Microphone permissions:
114+
```xml
115+
<key>NSMicrophoneUsageDescription</key>
116+
<string>PROVIDE YOUR REASON HERE</string>
117+
```
118+
99119
This should be added inside the `<dict>` element. Below shows a more complete example:
100120

101121
```xml
@@ -161,12 +181,13 @@ Developers must manually request Permissions.Camera and/or Permissions.Microphon
161181

162182
```csharp
163183
var cameraPermissionsRequest = await Permissions.RequestAsync<Permissions.Camera>();
164-
var microphonePermissionsRequest = await Permissions.RequestAsync<Permissions.Microphone>();
165184
```
166185

167-
Camera permission is always required.
186+
In case you plan to record video, request Microphone permissions:
168187

169-
Microphone Permission is required if you plan to use video recording.
188+
```csharp
189+
var microphonePermissionsRequest = await Permissions.RequestAsync<Permissions.Microphone>();
190+
```
170191

171192
### Including the XAML namespace
172193

0 commit comments

Comments
 (0)