I tried to find a simple tutorial that explains how to load a video from an URL to an Android media player but unfortunately From
I have tried many things to try to work on it, but there is no luck yet.
The best way of mediaplayer activity is to just load a video, a URL?
Thanks
Edit:
I have tried the following code as suggested:
VideoView VideoView = (Watch Video) WBID (R.id.your_video_view); MediaController MediaController = New MediaController (this); MediaController.setAnchorView (videoView); VideoView.setMediaController (mediaController); VideoView.setVideoURI (Uri.parse ("url-here")); VideoView.start (); When I go to this activity it only crashes.
You can use one. Here's an example:
Watch Video Video Video = (Watch Video) Find VVBIID (RdViewView); // Use a media controller so that you can scroll video content / and also start the video for breaks. MediaController MediaController = New MediaController (this); MediaController.setAnchorView (videoView); VideoView.setMediaController (mediaController); VideoView.setVideoURI (Uri.parse (videoUrl)); VideoView.start (); edit You must be a URI (" string url variable where its URL is With code Uri.parse (url) and also make sure the URL is appropriate. In addition, you have provided the appropriate permissions for your app, because the skyships have suggested (because it The Internet uses you and Use-permission Android: name = "android.permission.INTERNET" & gt; in your app's Manifest.xml )? Finally you will see your app's Manifest.xml EDIT P> You can also use Android Developers site to have a good tutorial.
Comments
Post a Comment