title: setDataSourceFD failed.: status=0x80000000 on playing aac file on Samsung phones
body: <p>I need to record and play an audio file, I use those two pieces of code:</p>
  
  <p><strong>For recording:</strong></p>
  
  <pre><code>private void initRecorder() {
      try {
          mRecorder = new MediaRecorder();
          mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);
          mRecorder.setOutputFormat(MediaRecorder.OutputFormat.AAC_ADTS);
          mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
          mRecorder.setOutputFile(RECORD_FILE_NAME);
          mRecorder.prepare();
          mRecorder.start();
      } catch (IllegalStateException | IOException e) {
          Utility.e("initRecorder: " + e.getMessage());
      }
  }
  </code></pre>
  
  <p><strong>For Playing:</strong></p>
  
  <pre><code>    try {
          FileDescriptor fd = null;
          FileInputStream fis = new FileInputStream(RECORD_FILE_NAME);
          fd = fis.getFD();
  
          if (fd != null) {
              mMediaPlayer = new MediaPlayer();
              mMediaPlayer.setDataSource(fd);
              mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
              mMediaPlayer.prepare();
  
              mMediaPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
                  @Override
                  public void onPrepared(MediaPlayer mp) {
                      if (mPlayTime &gt; 0) {
                          mMediaPlayer.seekTo(mPlayTime);
                      }
                      mMediaPlayer.start();
                      setStatus(STATUS_PLAYING);
                  }
              });
  
              mMediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
                  @Override
                  public void onCompletion(MediaPlayer mp) {
                      mMediaPlayer.release();
                      RecordMomentActivity.this.mPlayTime = 0;
                      setStatus(STATUS_NOT_PLAYING);
                  }
              });
          }
      } catch (Exception e) {
          Utility.e("Exception: " + e.getMessage());
          setStatus(STATUS_NOT_PLAYING);
      }
  }
  </code></pre>
  
  <p>And this code works great, records and plays audio on Nexus 5 (Android 6.0) and on LG G3 with Android 5.0. But when I use Samsung phones I get Exception: </p>
  
  <blockquote>
    <p>setDataSourceFD failed.: status=0x80000000</p>
  </blockquote>
  
  <p>Have someone encounter this issue? and knows how should I handle it? If not is there any alternative that I can use to record and play audio files?</p>