I need create WebView which can load a page from Youtube. I don't want play video, I need loading on WebView. I created this code:
WebView youtubeView=(WebView)findViewById(R.id.webViewYoutube);
WebSettings settings=youtubeView.getSettings();
settings.setJavaScriptEnabled(true);
youtubeView.loadUrl("http://www.youtube.com");
But when page is loaded then Android suggest me to choose a other program for loading this page. How can I do my task? I must loading th开发者_Go百科is page without standard browser and other.
If you have a device at least running a 2.2 android version you can read a youtube video directly in your WebView by adding this line:
settings.setPluginsEnabled(true);
Try loading http://m.youtube.com instead of www.youtube.com
精彩评论