Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 580
CoDe Avatar asked Oct 31 '12 11:10

CoDe


1 Answers

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

<uses-permission android:name="android.permission.INTERNET" /> 
like image 189
Quyen Nguyen Tuan Avatar answered Sep 20 '22 18:09

Quyen Nguyen Tuan