title: MediaPlayer: Couldn't open file on client side; trying server side: java.io.FileNotFoundException: No content provider:
body: <p>The Android MediaPlayer supports setting the data source with included HTTP Headers:
  setDataSource(Context context, Uri uri, Map headers)</p>
  
  <p>However if I use it to set HttpHeaders like this:</p>
  
  <pre><code>    Map&lt;String, String&gt; headers = new HashMap&lt;String, String&gt;();
      headers.put("cookie", "rapidsession="+MyApplication.getInstance().getAccess_token());
      mediaPlayer.setDataSource(mContext, mUri, headers )
  </code></pre>
  
  <p>It never play video on the phone:
  Galaxy S6 edge,android6.0.1</p>
  
  <p>but play normally on the phone like xiaomi  </p>
  
  <p>it can got the uri  and  i have added the Internet permission</p>
  
  <p>when I play audio, it is working. But logcat says:</p>
  
  <blockquote>
    <p>10-19 16:45:24.145 20369-20369/com.dj.zfwx.client.activity E/ViewRootImpl: sendUserActionEvent() mView == null
    10-19 16:45:24.415 20369-20369/com.dj.zfwx.client.activity W/MediaPlayer: Couldn't open file on client side; trying server side: java.io.FileNotFoundException: No content provider: <a href="http://video.zfwx.com/111/16mp4/qiyefengxian/20160923wuhua/1.m4a?key=40a3a0ec95632f538e53b530fb02f869&amp;start=1" rel="nofollow noreferrer">http://video.zfwx.com/111/16mp4/qiyefengxian/20160923wuhua/1.m4a?key=40a3a0ec95632f538e53b530fb02f869&amp;start=1</a>
    10-19 16:45:36.885 20369-21917/com.dj.zfwx.client.activity W/MediaHTTPConnection: readAt 3477123 / 32768 => java.net.ProtocolException
    10-19 16:45:36.895 20369-20386/com.dj.zfwx.client.activity W/MediaPlayer: info/warning (10973, 0)
    10-19 16:45:40.005 20369-20386/com.dj.zfwx.client.activity W/MediaPlayer: info/warning (702, 0)</p>
  </blockquote>
  
  <p>when I start the video, it is not working. The logcat says:</p>
  
  <blockquote>
    <p>10-19 16:45:43.235 20369-20369/com.dj.zfwx.client.activity W/MediaPlayer: Couldn't open file on client side; trying server side: java.io.FileNotFoundException: No content provider: <a href="http://video.zfwx.com/111/16mp4/qiyefengxian/20160923wuhua/1.mp4?key=40a3a0ec95632f538e53b530fb02f869&amp;start=3" rel="nofollow noreferrer">http://video.zfwx.com/111/16mp4/qiyefengxian/20160923wuhua/1.mp4?key=40a3a0ec95632f538e53b530fb02f869&amp;start=3</a>
    10-19 16:45:51.275 20369-22248/com.dj.zfwx.client.activity W/MediaHTTPConnection: readAt 15539690 / 32768 => java.net.ProtocolException
    10-19 16:45:51.405 20369-20369/com.dj.zfwx.client.activity W/MediaPlayer: this is IMEDIA_PLAYER_VIDEO_EXIST
    10-19 16:45:51.965 20369-21917/com.dj.zfwx.client.activity W/MediaHTTPConnection: readAt 107713 / 32768 => java.net.ProtocolException
    10-19 16:45:52.295 20369-20387/com.dj.zfwx.client.activity W/MediaHTTPConnection: readAt 56404 / 32768 => java.net.ProtocolException
    10-19 16:45:52.695 20369-21917/com.dj.zfwx.client.activity W/MediaHTTPConnection: readAt 263623 / 32768 => java.net.ProtocolException
    10-19 16:45:53.055 20369-20862/com.dj.zfwx.client.activity W/MediaHTTPConnection: readAt 107713 / 32768 => java.net.ProtocolException
    10-19 16:45:53.065 20369-22248/com.dj.zfwx.client.activity W/MediaPlayer: info/warning (3, 0)
    10-19 16:45:53.075 20369-22248/com.dj.zfwx.client.activity W/MediaPlayer: info/warning (702, 0)
    10-19 16:45:53.075 20369-22248/com.dj.zfwx.client.activity E/MediaPlayer: error (1, -1004)
    10-19 16:45:53.085 20369-20369/com.dj.zfwx.client.activity E/MediaPlayer: isPlaying: called in state MEDIA_PLAYER_STATE_ERROR
    10-19 16:45:53.085 20369-20369/com.dj.zfwx.client.activity E/MediaPlayer: isPlaying: called in state MEDIA_PLAYER_STATE_ERROR
    10-19 16:45:53.085 20369-20369/com.dj.zfwx.client.activity E/MediaPlayer: isPlaying: called in state MEDIA_PLAYER_STATE_ERROR
    10-19 16:45:53.085 20369-20369/com.dj.zfwx.client.activity E/MediaPlayer: isPlaying: called in state MEDIA_PLAYER_STATE_ERROR
    10-19 16:45:53.085 20369-20369/com.dj.zfwx.client.activity E/MediaPlayer: isPlaying: called in state MEDIA_PLAYER_STATE_ERROR
    10-19 16:45:53.085 20369-20369/com.dj.zfwx.client.activity E/MediaPlayer: isPlaying: called in state MEDIA_PLAYER_STATE_ERROR
    10-19 16:45:53.085 20369-20369/com.dj.zfwx.client.activity E/MediaPlayer: Error (1,-1004)</p>
  </blockquote>
  
  <p>please help me to solve it,please...
  luck to you
  thanks again!</p>