Created
April 24, 2020 22:01
-
-
Save codemillmatt/a6a68e8ce4c0d4bdb65664ee21d07cbe to your computer and use it in GitHub Desktop.
Prompt for microphone permissions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async Task<PermissionStatus> CheckAndRequestMicrophonePermission() | |
{ | |
var status = await Permissions.CheckStatusAsync<Permissions.Microphone>(); | |
if (status != PermissionStatus.Granted) | |
{ | |
status = await Permissions.RequestAsync<Permissions.Microphone>(); | |
} | |
return status; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment