java.io.IOException: setDataSource failed.: status=0x80000000

24,075

Do you remember to add this permission to your manifest file?

<uses-permission android:name="android.permission.INTERNET" />
Share:
24,075

Related videos on Youtube

CoDe
Author by

CoDe

Updated on July 09, 2022

Comments

  • CoDe
    CoDe almost 2 years

    I am trying to play url using media player in activity using:

    mediaPlayer = MediaPlayer.create(getApplicationContext(),
    Uri.parse("http://www.pocketjourney.com/downloads/pj/video/famous.3gp"),
    holder);
    

    It's working fine. Same code I use to set it as an live wallpaper in @onSurfaceCreated in WallpaperService, it's giving me following error log

    D/MediaPlayer( 4128): create failed: D/MediaPlayer( 4128):
    java.io.IOException: setDataSource failed.: status=0x80000000
    D/MediaPlayer( 4128):   at
    android.media.MediaPlayer._setDataSource(Native Method) D/MediaPlayer(
    4128):  at
    android.media.MediaPlayer.setDataSource(MediaPlayer.java:844)D/MediaPlayer( 4128): at
    android.media.MediaPlayer.setDataSource(MediaPlayer.java:806)......
    

    If I use local video uri to set live wallpaper..it working fine.

    Any idea/suggestion over here?

  • N.K
    N.K about 8 years
    i am trying to load a local file, and still getting this error... var uri = RingtoneManager.GetActualDefaultRingtoneUri(this, RingtoneType.Ringtone).ToString(); I am trying to play the Current Ringtone in the media Player
  • Bunny
    Bunny almost 8 years
    @N.K have you found any solution ? I am facing the same issue :(
  • N.K
    N.K almost 8 years
    @Bunny : Try cleaning the permissions and set them again, also the problem for me was my device was not asking for all the permissions, so try to add them manualy on the device after you install the test app .
  • Midhun Darvin
    Midhun Darvin over 5 years
    This is a problem with the sample android tv app shipped with android studio.