Friday, March 16, 2012

[android-developers] Re: AudioManager setSpeakerPhoneOn does not work on Android 2.2 (Galaxy Tab GT-P1000) but on Android 2.3.5 (HTC Wildfire S)?

Hi there,

today I've set 

aM.setMode(AudioManager.MODE_IN_CALL); 

within the above mentioned code. Now the Galaxy Tab with Android 2.2 does not play any sound anymore if a Bluetooth Headset is connected and paired. I am confused. Can anybody help?

Regards,

Christian

On Tuesday, 13 March 2012 11:21:57 UTC+1, Pinny3 wrote:
Hi there,

I've got the following code running on a HTC Wildfire with Android 2.3.5 and it's working perfectly and as expected, i.e. playing the sound on the internal speaker phone of the device if a bluetooth headset is paired and connected:

========== SNIP ===========
   AudioManager aM = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
   aM.setMode(AudioManager.MODE_NORMAL);
   aM.setBluetoothScoOn(false);
   aM.setBluetoothA2dpOn(false);
   aM.setWiredHeadsetOn(false);
   aM.setSpeakerphoneOn(true);
========== SNIP ===========

The funny thing is that the same code has no impact on the Galaxy Tab 7" (GT-P1000) running Android 2.2 - the sound is still played on the connected and paired headset if I run my app on this Galaxy Tab.

Is there anybody out there who knows the reason? Was there any change within Android 2.3.x regarding the wanted functionality?

Any help will be appreciated.

Regards,

Christian


--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment