Quantcast
Channel: Questions in topic: "ios"
Viewing all articles
Browse latest Browse all 4709

Microphone on iOS check if permission given

$
0
0
I can't find any way of checking if the user has given the app permission to use the microphone. I'm recording like this: audio.clip = Microphone.Start("Built-in Microphone", true, LOOPLENGTH, AudioSettings.outputSampleRate); audio.loop = true; while (!(Microphone.GetPosition("Built-in Microphone") > 0)) { } audio.Play(); which works fine. but if the user has not granted permission then there doesn't seem to be any way of checking, in order to behave differently (or show an alert, etc) I've tried checking if Microphone.Start returns null, but when permission is turned off it still returns non-null. I've also tried checking Microphone.IsRecording, but that seems to return true even when permission is turned off as well.

Viewing all articles
Browse latest Browse all 4709

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>