Hi Hap!

Try to use the voice call setting.
At least when used on AudioTrack the constants seem to be inverted.

AudioManager.STREAM_MUSIC seems to play in the earpiece while
AudioManager.STREAM_VOICE_CALL on the speaker.
Maybe you are suffering from the same effect.

BR Stoffe

On Nov 13, 10:02 am, hap 497 <[email protected]> wrote:
> I am able play a media using MediaPlayer. The media played via the ear piece.
>
> But how can I play the media with speaker phone? I have tried:
>
> AudioManager audioManager = (AudioManager)
> mActivity.getSystemService(Context.AUDIO_SERVICE);
> audioManager.setSpeakerphoneOn(true);
>
> But that does not work. And I have added this to my Manifest file
>
> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
>
> Can someone please tell me what am i missing?
>
> Thank you.

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

Reply via email to