Tuesday, March 13, 2012

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

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