

#Bluetooth sco audio disconnected Bluetooth#
What happens is that the first time I use a Bluetooth headset all is well, but once I've finished watching whatever and switch off the headset to put it on charge the LE audio output seems to break. = AudioManager AudioManager (AudioManager) context.getSystemService (Context.I'd like to enquire about reliability issues I've had on LE with Bluetooth audio output. Solve the problemįollowing the method of switching audio Audio output, with reference to the Android: Switching Audio and the Bluetooth Phone Speaker BETWEEN Inconsistent IS : When setting up the play mode, you need to consider the type of flow, flow type here I am using STREAM_MUSIC, so when you need to switch the playback device is set to MODE_IN_COMMUNICATION mode instead of MODE_NORMAL mode.

#Bluetooth sco audio disconnected android#
If you want to record the matter will certainly be open sco, so call the above setBluetoothScoOn (boolean on) can, through a Bluetooth headset recording, audio playback, and finished recording, remember to turn off finished playing.įurther, by the Android system tMode() for managing playback mode method. The main difference between the two is: A2DP only play, is on by default, and the SCO can play both recordings, is off by default. SCO: it is a two-way audio data transmission link, the link only supports 8K and 16K mono audio data can only be used for transmission of ordinary speech, if it can only be used to play music Oh the.A2DP: a one-way data transmission of high quality audio link, typically for playing stereo music.Here According to the article briefly introduce two kinds of links Bluetooth headset, A2DP and SCO. SetBluetoothScoOn(boolean on) : SCO requires the use of a Bluetooth headset to communicate SetSpeakerphoneOn(boolean on) : Direct selection loud speaker sound IsWiredHeadsetOn() : Check whether the headphone wire attached note that this method is only used to determine whether the earphone is inserted state, it does not use the results to determine a current Audio output through the earphone, which also depends on other conditions. IsSpeakerphoneOn() : Check that the speaker is turned on IsBluetoothA2dpOn() : Check whether A2DPAudio audio output via Bluetooth headset This requires forced to switch Audio output channels, to break the original strategy system.Īccess to information, can be seen in Android AudioManager query, switch the current channel Audio output, and when Audio output is changed, catch and handle this change.įirst remind you that when using the following method, you need to add permission:ĪudioManager following methods may be used to provide the current status query Audio output: These strategies Android system automatically switches, and can not meet all the demand for our products, such as music App need to unplug the headphones when listening to music operation stop (pause playback), to prevent a sudden switch to putting lead to embarrassment. Such as hands-free phone is to switch from the handset to the loud speaker, insert the headset is switched from the loud speaker to the headset.

In normal times, the hands-free telephone, headset plug, disconnecting a Bluetooth device like the operating system will automatically switch to the corresponding audio Audio output device.

There's putting mobile audio output (Speaker), Handset (Telephone Receiver), wired headset (WiredHeadset), Bluetooth Speaker (Bluetooth A2DP) and other output devices.
