How can I play videos from URL in android?. without new Intent?. is available? Thanks
Asked
Active
Viewed 1,215 times
-2
-
2[Please do some searching before you ask a question](http://stackoverflow.com/search?q=android+play+video+from+url) – FoamyGuy Aug 08 '12 at 02:36
-
is available? => **Yes there are many thread exist here on SO for the same topic and The best Google is there** – Paresh Mayani Aug 08 '12 at 04:23
2 Answers
0
try this
String url="your video url";
VideoView videoView = new VideoView(this);
videoView.setVideoURI(Uri.parse(url));
setContentView(videoView);
videoView.setMediaController(new MediaController(this));
hope help

Deepak Swami
- 3,838
- 1
- 31
- 46
0
Try this code...It should work fine.
VideoView videoView = (VideoView) findViewById(R.id.video_view);
MediaController mediaController = new MediaController(this);
mediaController.setAnchorView(videoView);
String link = "http://www.youtube.com/watch?v=lEbxLDuecHU&playnext=1&list=PL040F3034C69B1674";
Uri videoLink = Uri.parse(link);
videoView.setMediaController(mediaController);
videoView.setVideoURI(videoLink);
videoView.start();

Swaprks
- 1,553
- 11
- 16