-
Notifications
You must be signed in to change notification settings - Fork 124
Allow Developers to Manually Request Permissions when using CameraView, FileSaver, FolderPicker and SpeechToText #607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
86932e6
a6d2eb8
fc4d096
8dc199a
e0e02e1
446239a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
|
@@ -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> | ||
| ``` | ||
|
|
||
|
|
@@ -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 | ||
|
|
@@ -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 | ||
|
|
@@ -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>(); | ||
VladislavAntonyuk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| In case you plan to record video, request Microphone permissions: | ||
|
|
||
| ```csharp | ||
| var microphonePermissionsRequest = await Permissions.RequestAsync<Permissions.Microphone>(); | ||
|
||
| ``` | ||
|
|
||
| ### Including the XAML namespace | ||
|
|
||
| [!INCLUDE [XAML usage guidance](../includes/xaml-usage.md)] | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.