Hi,
Thanks a lot for your patch, I just merged it into our repository,
on the newUI branch, commit id
0cee0e357b568a0692d425701c4abf6c0960191f.
For your issue, I guess it's device related, I don't have the
problem with mine.
Regards.
Sylvain Berfini

On 28/07/2012 13:24, Doğancan Kefeli wrote:
Hello dear Linphone community,
In this mail, i want to tell us, how to add Bluetooth support
into linphone for android. In my project, I have tested code on
samsung galaxy tab 7.7"(p6800).
The changes are below.
1- In LinphoneManager.java File
-> Method routeAudioToSpeakerHelperHelper
private
void routeAudioToSpeakerHelperHelper(boolean speakerOn) {
boolean
different = isSpeakerOn() ^ speakerOn;
if
(!different) {
Log.d("Skipping
change audio route by the same route ",
speakerOn
? "speaker" : "earpiece");
return;
}
//add below
if(mAudioManager.isBluetoothScoAvailableOffCall()){
mAudioManager.setBluetoothScoOn(true);
mAudioManager.setBluetoothA2dpOn(speakerOn);
mAudioManager.setMode(AudioManager.MODE_IN_CALL);
mAudioManager.startBluetoothSco();
return;
}else{
if
(Hacks.needGalaxySAudioHack() || sLPref.useGalaxySHack())
setAudioModeIncallForGalaxyS();
if
(sLPref.useSpecificAudioModeHack() != -1)
mAudioManager.setMode(sLPref.useSpecificAudioModeHack());
if
(Hacks.needRoutingAPI() || sLPref.useAudioRoutingAPIHack()) {
mAudioManager.setRouting(
MODE_NORMAL,
speakerOn?
ROUTE_SPEAKER : ROUTE_EARPIECE,
AudioManager.ROUTE_ALL);
}
else {
mAudioManager.setSpeakerphoneOn(speakerOn);
}
for
(LinphoneOnAudioChangedListener listener :
getSimpleListeners(LinphoneOnAudioChangedListener.class)) {
listener.onAudioStateChanged(speakerOn
? AudioState.SPEAKER : AudioState.EARPIECE);
}
}
}
2-Add permission to AndroidManifest.xml File
<uses-permission
android:name="android.permission.BLUETOOTH" />
Then Bluetooth headset can be used.
Issue:
Mic is hearing low by receiver.But, it may be caused by
device.
Thanks linphone team.
Doğancan Kefeli
Software Engineer
_______________________________________________
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers