Ioexcepion on Samsung to get Media Player file

Asked

Viewed 50 times

0

I’m having a little problem, I’m running a video in the background of a layout, in other devices works normal but in Samsung I can’t access the video and take the Exception

  java.io.IOException: setDataSourceFD failed.: status=0x80000000
  at android.media.MediaPlayer.setDataSource(Native Method)at android.media.MediaPlayer.setDataSource(MediaPlayer.java:939)

Code

  Uri video = Uri.parse("android.resource://" + getPackageName() + "/"
                + R.raw.app_video_medium);

        mp.setDataSource(getApplicationContext(), video);
        mp.prepare();

Does anyone know why?

  • Check if you have permission and if the Uri that is correct.

  • I have permission and the URI is correct, this error only happens in Samsung cell phones, test in an Asus and a Sony worked

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.