How to Play mp4 Video in Android Emulator Using Remote URL ? I used following code but this code give me error "Sorry, this video cannot be played".
07-05 16:58:19.525: INFO/AwesomePlayer(34): mConnectingDataSource->connect() returned -1007 07-05 16:58:19.525: ERROR/MediaPlayer(1242): error (1, -1007) 07-05 16:58:19.525: ERROR/MediaPlayer(1242): Error (1,-1007) 07-05 16:58:19.525: DEBUG/VideoView(1242): Error: 1,-1007
My Code is:-
public class VideoPlayerController extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); VideoView videoView = (VideoView) findViewById(R.id.VideoView); MediaController mediaController = new MediaController(this); mediaController.setAnchorView(videoView); String Video="http://s509.photobucket.com/albums/s338/eveanthony/?action=view¤t=Video013.mp4"; videoView.setMediaController(mediaController); videoView.setVideoURI(Uri.parse(Video)); videoView.start(); } }