[android] m4a record with bluetooth headset

[android] m4a record with bluetooth headset

블루투스 헤드셋의 마이크로 녹음을 해야할 일이 생겼는데, 검색어를 mp3로 했더니 정말 찾기도 힘들고, 어렵게 되어있더라 ;;;;
일본 개발자가 만들어 놓은 소스를 수정해서 블루투스에서 mp3로 저장하게 만들어 봤다.
https://github.com/susemi99/AndroidBluetoothVoiceRecorder

 

하지만 다른 프로젝트에서 가져가서 붙이려니 뭐가 이리 어려운지 ㅠㅠ

그러다가 문득 m4a로 하면 안되나 싶어서 검색해봤더니 아주 쉽게 되어있다 -_-;;;;
바보인가 ㅠ

 

 

 

 

주요 부분의 소스는 이렇다.

블루투스를 열어놓고?, 파일을 만들어 놓고, MediaRecorder를 실행하면 되는 거였다.

 

 

 

 

 

 

처음부터 mp3 대신에 mp4나 m4a 로 검색했으면 쉽게 끝났을 일을 ㅠㅠ

 

code : https://github.com/susemi99/AudioRecordByBluetooth

 

  • leeyoongu

    Hello sir, It has not bluetooth recoding. Just only recording from MIC. Please show full code as long as possible.

    • connect bluetooth headset first.

      • mjohn

        Hello 쎄미, I am using your code https://github.com/susemi99/TestBluetoothClick to record audio from handset device. I connected handset and my device. I can control media button in handset to recording and stoping audio. I also can open the audio after record. However, the problem is that the audio record from MIC of phone. I don’t know what is happen. I tried many time but the sound that record is not from MIC of handset device. Could you run again your code and let me know if you have same problem. I am using Galaxy S2 and handset HS3000 (http://www.samsung.com/hk_en/consumer/mobile/mobile-phones/accessories/BHS3000UBECWDT?subsubtype=bluetooth-headset)

      • mjohn

        During two days, I upgraded your project to 4.2.2 (I found that version 4.1.2 did not works). However, the problem still cannot resolve. How about your progression?

        • 쎄미

          sorry. I’m too late.(arrive at home before 10 minute ago. don’t work in korea!).
          And program works very well.(using nexus 7 + LG HBS730)
          when scratch mic of headset, it recording well.
          try more times.
          sorry I can’t help you anymore.

          • mjohn

            Thank you so much. I also run it successfully. The problem is that my phone OS has some problem. And I loaded its kernel again. Thank thank you
            I have a idea to use your project. I will make a canvas and display signal strength in it. The application will recieve the audio file and analysis the signal to signal strength. Do you think is it possible?

          • signal strength of headset? I have no idea.

        • mjohn

          Sorry, It is Amplitude of audio. It is easy by using function _recorder.getMaxAmplitude(). However, I want to put this function in a callback which call automatically when audio signal is received. I am finding this function but I did not found it.

          • mjohn

            Sorry, your link is set volumn. I am working in how to measure amplitude of audio. During recording or receiving data from bluetooth handset, we can call the getMaxAmplitude function to get this value. It works. But now, I must put it inside a OnClick event. I want to put it in the callback function that automatically call when data is received

          • 쎄미

            I don’t know how to use, but if can working when recording put in start()