1

I have an Audio class device(External microphone) which connects with Android by USB port, I want to record the sound from the USB external microphone.

Currently I'm using AudioRecorder class, by this class functionality I'can record the audio from external microphone. But it fails in some conditions listed bellow.

  1. When user connect any wired headset through AUX port then AudioRecorder start recording from the AUX port headset.
  2. Same in case of Bluetooth headset.

I can't disable AUX port & Bluetooth because I want playback same time(user can listen recording via any available audio output source while recording audio from USB)

I have tried following solutions

  1. AudioRecord(MediaRecorder.AudioSource.MIC,... changing audio source doesn't help me
  2. twilio/audioswitch Library
  3. FriendFX/android-audioswitch Library
  4. By Java Reflection API
Rahul Pareta
  • 786
  • 6
  • 18

1 Answers1

1

Yes there is. It will take a bit of work so I am just providing a link about how to do it.

https://wiki.st.com/stm32mpu/wiki/How_to_change_audio_device_for_Android

Drivers Sea
  • 446
  • 2
  • 10