开发者

Is there a way to actively listen on bluetooth audio channel?

开发者 https://www.devze.com 2023-04-09 22:29 出处:网络
I want to be able to use the bluetooth headset as a microphone. Is it开发者_如何学Python possible to set it to microphone mode?Yes, you have to use startBluetoothSco()

I want to be able to use the bluetooth headset as a microphone.

Is it开发者_如何学Python possible to set it to microphone mode?


Yes, you have to use startBluetoothSco()

This method can be used by applications wanting to send and received audio to/from a bluetooth SCO headset while the phone is not in call.


AudioManager localAudioManager = (AudioManager) getSystemService("audio");
            localAudioManager.setBluetoothScoOn(true);
            localAudioManager.startBluetoothSco();
            localAudioManager.setMode(2);
0

精彩评论

暂无评论...
验证码 换一张
取 消