Skip to content

Commit

Permalink
Fix crash issue when recording audio file
Browse files Browse the repository at this point in the history
  • Loading branch information
tien-awair committed Apr 22, 2022
1 parent 16150f7 commit f547107
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion uikit/src/main/java/com/sendbird/uikit/AudioRecorder.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ public File startRecording(Context context) {
recorder.setOutputFile(output.getAbsolutePath());
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
recorder.prepare();
Thread.sleep(1000);
recorder.start();
return output;
} catch (IOException e) {
} catch (IOException | InterruptedException | RuntimeException e) {
return null;
}
}
Expand Down

0 comments on commit f547107

Please sign in to comment.