show the current recording duration at the bottom

This commit is contained in:
tibbi
2020-03-30 10:06:05 +02:00
parent 16c2c4e04a
commit 85be73671f
2 changed files with 16 additions and 0 deletions

View File

@ -89,6 +89,7 @@ class MainActivity : SimpleActivity() {
}
private fun initVoiceRecorder() {
updateRecordingDuration(0)
toggle_recording_button.setOnClickListener {
toggleRecording()
}
@ -105,6 +106,10 @@ class MainActivity : SimpleActivity() {
}
}
private fun updateRecordingDuration(seconds: Int) {
recording_duration.text = seconds.getFormattedDuration()
}
// mp4 output format with aac encoding should produce good enough mp3 files according to https://stackoverflow.com/a/33054794/1967672
private fun startRecording() {
val baseFolder = if (isQPlus()) {