Reputation: 13
I am using MediaRecorder to record audio in Xamarin Android. I want to add Pause and Resume functionality to this. MediaRecorder does not have built in methods to Pause and Resume the recording. How can I accomplish this? Do I need to store separate audio files when Paused and merge them in a single audio file? If yes, then how can I implement that in Xamarin Android?
Thanks in advance.
Upvotes: 0
Views: 977
Reputation: 74144
Pause
and Resume
was added to MediaRecorder
in API 24
Pauses recording. Call this after start(). You may resume recording with resume() without reconfiguration, as opposed to stop().
Pauses recording. Call this after start(). You may resume recording with resume() without reconfiguration, as opposed to stop()
Device running API 23
and below, the developer would be responsible for "appending" files together if that is your app requirement.
See this SO as an example: How to append to Android MediaRecorder output file
Ref: MediaRecorder Pause
Upvotes: 1