Force output sound to internal speaker while headphones plugged in
Asked Answered
M

1

10

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.

Microeconomics answered 24/4, 2016 at 11:24 Comment(3)
Did you checked this link? I had same problem and it saved me!Telophase
Possible duplicate of Is there any way to force audio through the speakers when headphones are plugged in?Patricapatrice
@MohammadZ It doesn't work for me. I'm using Marshmaellow btw.Microeconomics
K
1

Hello use this instead:

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

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

Knockknee answered 19/8, 2016 at 3:33 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.