Share via


Handle microphone interruptions

Sometimes audio recording is interrupted because other apps request and gain access to the microphone; for example, the user answers a phone call while recording. In this case, audio streaming stops automatically. You must decide how to handle such interruptions; the following options are available:

  • Automatically resume recording when the microphone becomes available again.

  • The user manually resumes recording when they end their call.

  • Your app notifies the user that the recording was interrupted.

Be aware of the following:

  • iOS doesn’t allow the user to start recording while the app is in the background. If startRecording() is called while the app is in the background, DAXKit will send a didFailToStartRecording() callback and the user should be notified.

  • Exactly how iOS handles recording interruptions and system sounds depends on the iOS version installed. There have often been changes from one version to another.

This diagram shows how the different components interact when a recording is interrupted by a phone call:

how DAXKit components interact when a recording is interrupted by a phone call