안드로이드 개발 질문/답변
(글 수 45,052)
.
.
.
.
private static final String MEDIA_PATH = new String("/sdcard/");
private int button_state = 0;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
final Button button1 = (Button)findViewById(R.id.Button01);
final Button button2 = (Button)findViewById(R.id.Button02);
final MediaRecorder recorder = new MediaRecorder();
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
recorder.setOutputFile(MEDIA_PATH);
//RECORD_AUDIO permission 요망 and record부분
button1.setOnClickListener(new Button.OnClickListener() {
public void onClick(View v) {
try{
Toast.makeText(getApplicationContext(), "녹음준비..", Toast.LENGTH_SHORT).show();
recorder.prepare();
button_state = 1;
recorder.start();
}catch(IOException exception){
recorder.reset();
recorder.release();
button_state=2;
Toast.makeText(getApplicationContext(), "녹음에러..", Toast.LENGTH_SHORT).show();
}
}
});
.
.
-에러내용
02-10 13:00:47.170: ERROR/audio_input(1203): unsupported parameter: x-pvmf/media-input-node/cap-config-interface;valtype=key_specific_value
02-10 13:00:47.170: ERROR/audio_input(1203): VerifyAndSetParameter failed
try부분에러 에러부분으로 넘어갑니다. path를 잘못지정해서그런건지 딴이유가 있는건지 이유를 알고싶습니다.
.
.
.
private static final String MEDIA_PATH = new String("/sdcard/");
private int button_state = 0;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
final Button button1 = (Button)findViewById(R.id.Button01);
final Button button2 = (Button)findViewById(R.id.Button02);
final MediaRecorder recorder = new MediaRecorder();
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
recorder.setOutputFile(MEDIA_PATH);
//RECORD_AUDIO permission 요망 and record부분
button1.setOnClickListener(new Button.OnClickListener() {
public void onClick(View v) {
try{
Toast.makeText(getApplicationContext(), "녹음준비..", Toast.LENGTH_SHORT).show();
recorder.prepare();
button_state = 1;
recorder.start();
}catch(IOException exception){
recorder.reset();
recorder.release();
button_state=2;
Toast.makeText(getApplicationContext(), "녹음에러..", Toast.LENGTH_SHORT).show();
}
}
});
.
.
-에러내용
02-10 13:00:47.170: ERROR/audio_input(1203): unsupported parameter: x-pvmf/media-input-node/cap-config-interface;valtype=key_specific_value
02-10 13:00:47.170: ERROR/audio_input(1203): VerifyAndSetParameter failed
try부분에러 에러부분으로 넘어갑니다. path를 잘못지정해서그런건지 딴이유가 있는건지 이유를 알고싶습니다.
도움이 되실진 모르겠지만;;;