Question

In my App am using AVAudioRecorder for recording. There is no problem regarding the recording. When I play my app for the first time, the problem is that an alertview pop ups, regarding allow/dis allow the microphone to be used.

I want to have

1) control over this default alertview, so that my recording and timer (a label that is used to show the seconds, audio recorded) starts only when I click on Allow microphone,

OR

2) need to set microphones available for the app, so that It doesn't prompt the alertview asking to allow/dis allow microphone.

I searched internet, stackoverflow, but didnt get any thing related to this post. Read some posts, but they were regarding displaying the status, that microphone is available for app or not, which is not of that much use for me.

Was it helpful?

Solution

As John mentioned in the comments it is default behaviour for the app to ask for permission to use the microphone and this cannot be changed. However you can however check to see if permission has been granted.

You should probably have a look through this question as it explains how to check and see if access has been granted to use the microphone. You can then start your recording once permission has been granted.

Detect microphone permission

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top