Sie können einen benutzerdefinierten Recorder verwenden:
final static int RQS_RECORDING = 1;
Uri savedUri;
Button buttonRecord;
@Override public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_test);
buttonRecord = (Button) findViewById(R.id.record);
buttonRecord.setOnClickListener(new Button.OnClickListener() {
@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent intent = new Intent(
MediaStore.Audio.Media.RECORD_SOUND_ACTION);
startActivityForResult(intent, RQS_RECORDING);
}
});
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
// TODO Auto-generated method stub
if (requestCode == RQS_RECORDING) {
savedUri = data.getData();
Toast.makeText(MainActivity.this,
"Gespeichert: " + savedUri.getPath(), Toast.LENGTH_LONG).show();
}
}