Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 4.0 #5

Open
GoogleCodeExporter opened this issue Jun 5, 2015 · 6 comments
Open

Android 4.0 #5

GoogleCodeExporter opened this issue Jun 5, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

This will not work with ICS(Android 4.0 or higher) as it would use new method 
onShowCustomView(View view, int requestedOrientation, 
WebChromeClient.CustomViewCallback callback)

I hope you will update it to support ICS.

Original issue reported on code.google.com by mind...@gmail.com on 5 May 2012 at 9:53

@GoogleCodeExporter
Copy link
Author

That method wasn't called when I've tried to open youtube video.
Sound is playing fine but it shows black screen instead of video

Original comment by VShapra...@betria.com on 3 Jul 2012 at 9:29

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

I am facing the exact same issue i am trying to load a url which has youtube 
video embedded using iframe. I have added hardwareacceleration as true in 
manifest file.
I am only able to hear sound and i see a black screen.

The onShowCustomView and getVideoLoadingProgressView do not get called
and this is what i see in the logcat when the video is loaded.

07-05 18:45:29.790: E/libEGL(1143): call to OpenGL ES API with no current 
context (logged once per thread)
07-05 18:45:29.800: D/MediaPlayer(1143): Couldn't open file on client side, 
trying server side
07-05 18:45:30.079: E/libEGL(1143): call to OpenGL ES API with no current 
context (logged once per thread)
07-05 18:45:30.079: D/ShaderProgram(1143): couldn't load the vertex shader!
07-05 18:45:30.079: E/libEGL(1143): call to OpenGL ES API with no current 
context (logged once per thread)
07-05 18:45:30.079: D/ShaderProgram(1143): couldn't load the vertex shader!
07-05 18:45:30.079: E/libEGL(1143): call to OpenGL ES API with no current 
context (logged once per thread)
07-05 18:45:30.079: D/ShaderProgram(1143): couldn't load the vertex shader!
07-05 18:45:30.079: E/libEGL(1143): call to OpenGL ES API with no current 
context (logged once per thread)
07-05 18:45:30.079: D/ShaderProgram(1143): couldn't load the vertex shader!
07-05 18:45:30.079: E/libEGL(1143): call to OpenGL ES API with no current 
context (logged once per thread)
07-05 18:45:30.079: D/ShaderProgram(1143): couldn't load the vertex shader!

NOTE: This works perfectly fine on android gingerbread
Can anyone help me out on this?

I also tried the new method onShowCustomView(View view, int 
requestedOrientation, WebChromeClient.CustomViewCallback callback)
as suggested in the first comment but it is not working

Original comment by Aniket.B...@gmail.com on 5 Jul 2012 at 1:37

@GoogleCodeExporter
Copy link
Author

Write this code in onBackPressed() or in onPause()

Class.forName("com.***.HTML5WebView").getMethod("onPause", (Class[]) 
null).invoke(html5WebView, (Object[]) null);

It worked for me in 4.2

Original comment by subairar...@gmail.com on 8 Jan 2013 at 12:49

@GoogleCodeExporter
Copy link
Author

I think adding  android:hardwareAccelerate="true" to manifest file will solve 
most of your problems. For <iframe>, simple solution is to change 
shouldOverrideUrlLoading() to always return false.

Original comment by koansin....@gmail.com on 4 Feb 2013 at 1:10

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

You can try to set an user agent to the webView it works for me on ICS like 
this:
String ua = "Mozilla/5.0 (Android; Tablet; rv:20.0) Gecko/20.0 Firefox/20.0";

WebSettings s = getSettings();
s.setUserAgentString(ua);

if it don't work look at this link for other user agents:
http://android-er.blogspot.com/2013/05/set-user-agent-string-of-webview.html

Good luck

Original comment by hafid....@gmail.com on 31 Oct 2013 at 10:22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant