1
이제 A2DP를 통해 오디오 재생을 시작하고 SCO로 성공적으로 전환 할 수있는 앱을 얻을 수 있지만 대신 휴대 전화의 스피커로 재생하려고하면 다시 전환하려고합니다.Android 2.3 : 가능한 Bluetooth 스피커 용으로 SCO에서 A2DP로 전환하려면 어떻게해야합니까?
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
layout = (RelativeLayout) findViewById(R.id.layout);
text = (TextView) findViewById(R.id.editText1);
scoSwitch = (ToggleButton) findViewById(R.id.switch1);
try {
mp1 = MediaPlayer.create(this, R.raw.jc_cm);
mp2 = MediaPlayer.create(this, R.raw.rp);
amanager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
//amanager.setBluetoothA2dpOn(true);
} catch (IllegalArgumentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IllegalStateException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public void onSCOswitch(View view){
if (scoSwitch.isChecked()){
amanager.setBluetoothScoOn(true);
amanager.startBluetoothSco();
Log.d("Bluetooth", "SCO on");
amanager.setMode(AudioManager.MODE_IN_COMMUNICATION);
}
else{
amanager.stopBluetoothSco();
amanager.setBluetoothScoOn(false);
amanager.setBluetoothA2dpOn(true);
Log.d("Bluetooth", "SCO off");
amanager.setMode(AudioManager.MODE_NORMAL);
}
}
1 년 후에도 여전히 가능하지 않습니까? – frankish
다음 몇 주/몇 달 후에 다시 방문 할 것입니다. 나는 아무것도 찾지 못할 경우이 스레드를 업데이트 할 것입니다. – swooby