Recording the tapped button with the audio

☆樱花仙子☆ 提交于 2020-01-11 07:12:29

问题


I am creating an instrument. I want that the record button can record the audio and what was tapped.

But when I tap the record button, it only record the audio. I want to record the audio and what was tapped by the user.

Here it my code for record.

public void startRecord() throws Exception
{
    record = new MediaRecorder();
    record.setAudioSource(MediaRecorder.AudioSource.MIC);
    record.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
    record.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
    record.setOutputFile(FILE);

    record.prepare();
    record.start();

}

来源:https://stackoverflow.com/questions/32694903/recording-the-tapped-button-with-the-audio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!