0

I'm writing a WebView that will play HTML5Video and am having a problem with the Navigation Bar when it's trying to be hidden by the system in fullscreen mode. I am targeting SDK version 10 because I still need the menu key for legacy support. However due to that it tries to hide the Navigation Bar causing a GL_INVALID_OPERATION error, instead of going to LOW_PROFILE mode.

the logcat looks like this:

09-16 10:55:52.939: W/InputMethodManagerService(605): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@42485690 attribute=null, token = android.os.BinderProxy@42d14468
09-16 10:55:52.949: V/PhoneStatusBar(766): setLightsOn(true)
09-16 10:55:53.039: V/PhoneStatusBar(766): setLightsOn(true)
09-16 10:55:53.240: D/OpenGLRenderer(24538): GL error from OpenGLRenderer: 0x502
09-16 10:55:53.240: E/OpenGLRenderer(24538):   GL_INVALID_OPERATION
keaukraine
  • 5,315
  • 29
  • 54
Pedlar
  • 1,034
  • 10
  • 7

1 Answers1

0

Do you make a check for SDK version? setSystemUiVisibility() works only on API level 11 (Honeycomb) and up.

if (Build.VERSION.SDK_INT >= 11) {
    setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);
} 
keaukraine
  • 5,315
  • 29
  • 54
  • Yes, I've tried adding that to the onShowCustomView for the WebChromeClient but that didn't make any difference, it still tries to hide the Navigation Bar completely, which causes the GL error, and repeats until the video is over. – Pedlar Sep 17 '13 at 14:56