Intent intent = new Intent(
"android.provider.MediaStore.RECORD_SOUND");
startActivity(intent);
MediaRecorder mediaRecorder = new MediaRecorder();
try {
mediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
mediaRecorder
.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
mediaRecorder
.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
mediaRecorder.setOutputFile(mSDpath + "/myvoi/" + fileName3
+ ".3gpp");
mediaRecorder.prepare();
mediaRecorder.start();
} catch (IOException ioe) {
Toast.makeText(MainActivity.this, "IOException",
Toast.LENGTH_SHORT).show();
}
위 코드로 오디오 기능을 실행 해봤는데요
오디오가 5초 까지 밖에 저장이 안됩니다. 녹음은 수십초 까지 했는데
저장된 파일을 확인해보면 5초까지밖에 안되어있는데 무슨문제인지 모르겠습니다.
봐주세요