Play sound either from external or internal speaker programmatically
<p>Suppose I have a <strong>MediaPlayer</strong> class object which is playing some music. Now I want to change the music to play either from device's internal speaker or already plugged in earphone.</p>

<p>Let's say just by tapping a button. Is that possible?</p>