How to upload a video to a screen?

Asked

Viewed 84 times

1

I’m making an application in Android Studio where I have the main screen (Mainactivity) that has a menu with several links and one of them calls a Fragment(Videofragment) where when loaded should show a video(youtube and local) with description, can someone give a help? thanks for your attention.

  • I think this can help you: https://developer.android.com/training/basics/intents/sending.html

1 answer

0

You can use a webView, for example:

WebView myWebView = (WebView) findViewById( R.id.webview_compontent );

String playVideo= "<html><body>Youtube video .. <br> <iframe class=\"youtube-player\" type=\"text/html\" width=\"640\" height=\"385\" src=\"http://www.youtube.com/embed/bIPcobKMB94\" frameborder=\"0\"></body></html>"

myWebView.loadData(playVideo, "text/html", "utf-8");

Hugs.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.