So I've created an android app that plays video from blip.tv and various other flash-enabled websites. I use a Webview
to display the video. Here is my code:
try{
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().addFlags(LayoutParams.FLAG_KEEP_SCREEN_ON);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
view = new WebView(this);
view.getSettings().setPluginsEnabled(true);
view.getSettings().setPluginState(WebSettings.PluginState.ON);
view.getSettings().setJavaScriptEnabled(true);
view.getSettings().setLoadWithOverviewMode(true);
view.getSettings().setUseWideViewPort(true);
view.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
view.setScrollbarFadingEnabled(true);
// get the html code
String html = getIntent().getStringExtra("VIDEO_CONTENT");
view.loadData(html, "text/html", null);
setContentView(view);
}
catch(Exception e){
}
The problem is with android 4 (Ice Cream Sandwich). When I try to put the app into full screen mode, the app crashes. The app does NOT crash on android 2.3 or 3.0 however. Any ideas to fix this?