2
내가 그것에 대해 검색 좀하지만 모든 솔루션을 내가 수신 및 발신 통화MediaRecorder : 시작은
에게 발신 통화와 함께 잘 작동하지만, 수신 전화에 예외를 제공코드를 기록하고
를 찾지 못했습니다 실패
recorder = new MediaRecorder();
File sdCard = Environment.getExternalStorageDirectory();
File dir = new File(sdCard.getAbsolutePath() + "/OK");
dir.mkdirs();
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
recorder.setOutputFile(Environment.getExternalStorageDirectory().getAbsolutePath()+"/OK/"+"yes"+".3gpp");
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
try {
recorder.prepare();
recorder.start();
} catch (IllegalStateException e) {
Log.d("illegal",e.toString());
} catch (IOException e) {
Log.d("io",e.toString());
}
로그 캣
그 수신 전화에서 작동하지 않는 이유02-23 01:43:08.346 11231-11231/com.example.myapps.acr **I/record﹕ start**
02-23 01:43:08.426 11231-11231/com.example.myapps.acr **E/MediaRecorder﹕ start failed: -38**
02-23 01:43:08.426 11231-11231/com.example.myapps.acr **D/illegal﹕ java.lang.IllegalStateException**
들어오는를 들어
나를 위해 작동하지 않았습니다. – TheOnlyAnil
버전을 테스트하고 있습니까? 롤리팝 이상에서는 작동하지 않습니다. –
예, Lollipop. Lollipop + 기기에서 작동하도록하려면 어떻게해야하나요? – TheOnlyAnil