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.
- When user connect any wired headset through AUX port then AudioRecorder start recording from the AUX port headset.
- 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
- AudioRecord(MediaRecorder.AudioSource.MIC,... changing audio source doesn't help me
- twilio/audioswitch Library
- FriendFX/android-audioswitch Library
- By Java Reflection API