MediaPlayer Error (1, -1004)
<p>I have searched too much here on stack overflow but I am unable to find any solution of my problem.</p>

<p>I am getting a Media Player Error named 'MEDIA_ERROR_IO' code -1004.</p>

<p>I am stream an audio from server everything works good. song prepared and then starts in <strong>onPrepared()</strong> method.</p>

<p>Now the problem comes when there is an incoming call and phone starts ringing, and I pauses the song by calling <strong>mediaPlayer.pause()</strong> from my BroadcastReceiver class. </p>

<p>when the Phone call ends start the audio again by calling <strong>mediaPlayer.start()</strong> </p>

<p>the audio starts but after 2-3 seconds it stops with an Error that is MediaPlayer error (1, -1004).</p>

<p><em><strong>Now What should I do?</strong></em></p>

<p>Any Help is appreciable. </p>

<p>Thank you.</p>