I'm working an Android project about record and play from a connected Bluetooth headset's microphone. I need to use native code (Open SL ES). I referred the answer of Hoan Nguyen. My results:

If I record and play = Java (Use AudioRecord for record and AudioTrack for play) => okay

If I record = native code:
- Test on Nexus 5x (Android 6.0.1): fail
- Test on HTC One E8 (Android 5.0.1): ok
- Test on Nexus 5 (Android 5.0.1): ok

I also referred Link 2 but it was not finalized.

Does Open SL ES not support bluetooth headset? Or Have I to write native code for connection Bluetooth?

Thanks!

- - - Updated - - -

P/s: I updated link 1 and link 2
- Link 1: stackoverflow.com/questions/14991158/using-the-android-recognizerintent-with-a-bluetooth-headset/14993590#14993590
- Link 2: grokbase.com/t/gg/android-ndk/15aptap8v8/how-do-you-acquire-microphone-audio-via-opensl-es-from-a-connected-bluetooth-headsets-microphone