Reply To: Android runtime permissions

Welcome! Forums Unity Plugins Mobile Speech Recognizer Android runtime permissions Reply To: Android runtime permissions

#2150
Vana
Participant

Hello,
this I added to SpeechRecognizerListener.cs Script to make it work:

private void Start()
{
  #if PLATFORM_ANDROID
  if (!Permission.HasUserAuthorizedPermission(Permission.Microphone))
  {
     Permission.RequestUserPermission(Permission.Microphone);
  }
  #endif
}
  • This reply was modified 1 year, 2 months ago by Vana.