Ahmed Hegazy
Ahmed Hegazy

Reputation: 12605

Force output sound to internal speaker while headphones plugged in

How do I make the internal phone speaker play sound while plugging in my headphones? I see that it's possible by using the SoundAbout app.

I've tried this answer which suggests

audioManager.setMode(AudioManager.MODE_IN_CALL);
audioManager.setSpeakerphoneOn(true);

I may have done it in the wrong way. I'm just setting that and using the MediaPlayer to play some music.

I'm using Nexus 6 to do this test.

Upvotes: 10

Views: 5575

Answers (1)

mangu23
mangu23

Reputation: 880

Hello use this instead:

mAudioManager.setMode(AudioManager.MODE_CURRENT);
mAudioManager.setSpeakerphoneOn(true);

I am using the Nexus 6 device as well. Hope this helps!

Upvotes: 1

Related Questions