i tried to load the url ww.youtube.com on my app in a webview. but it cant be load completely. it loads just like below image. in the browser it loads comfortably. why? Any Idea?
+1
A:
It might be a problem with WebViews - WebViews aren't fully fledged browsers, and have limited functionality. For example, the reference page specifically says that WebViews don't handle JavaScripts. If JavaScripts, Flash or something like that is required to properly load YouTube, then that could be why the WebView doesn't handle it properly.
Steve H
2010-05-19 15:39:18
thats acceptable. there must be a solution. right? what is that?
Praveen Chandrasekaran
2010-05-19 16:23:20
myWebView = (WebView) findViewById(R.id.webview); WebSettings webSettings = myWebView.getSettings(); webSettings.setJavaScriptEnabled(true); myWebView.loadUrl("http://www.youtube.com");
Jorgesys
2010-05-19 16:45:27
thanks a lot. it works. but can't play the video like browser. is there any possibles??
Praveen Chandrasekaran
2010-05-19 17:08:11
Some Videos can't play in a mobile device, check the youtube API! http://code.google.com/intl/en-US/apis/youtube/2.0/reference.html
Jorgesys
2010-05-19 17:44:29
its playing in the browser. why it cant be in web view.
Praveen Chandrasekaran
2010-05-19 17:50:44
some videos cannot be played in mobile phones because ... ***limitedSyndication*** - The video is not and, based on the content owner's current preferences, will not be available to play in non-browser devices, such as mobile phones.http://code.google.com/apis/youtube/2.0/reference.html#youtube_data_api_tag_yt:state(btw check my response about enable javascript if was the correct =) hehe)
Jorgesys
2010-05-19 19:26:52
+1
A:
Enable JavaScript! =)
myWebView = (WebView) findViewById(R.id.webview);
WebSettings webSettings = myWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
myWebView.loadUrl("http://www.youtube.com");
Jorgesys
2010-05-19 17:41:38
A:
the simple answer is to call the youtube app thats loaded on every phone with your webview. check out the code on http://fluxkore.com/index.php/android-apps/ to call the youtube app.....
Donny D
2010-10-03 18:54:52