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.