当试图进入全屏模式的Android 4.0时,Flash播放器崩溃 [英] flash player crashes when trying to enter fullscreen mode android 4.0

查看:230
本文介绍了当试图进入全屏模式的Android 4.0时,Flash播放器崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我创建了一个android应用程序,可以播放来自blip.tv和其他各种支持flash的网站的视频。我使用 Webview 来显示视频。这是我的代码:

  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);


//获取html代码
String html = getIntent()。getStringExtra(VIDEO_CONTENT);

view.loadData(html,text / html,null);
setContentView(view);

catch(Exception e){

}



问题是与Android 4(冰淇淋三明治)。当我尝试将应用程序置于全屏模式时,应用程序崩溃。但是,该应用程序不会在Android 2.3或3.0崩溃。任何想法来解决这个问题吗?解决方案好的,所以我认为这是一个Android 4.0.2 / Flash播放器的问题,因为其他当Flash进入全屏模式时,诸如浏览器 dolphin mini 等应用程序崩溃。


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?

解决方案

Okay, so I think this is an android 4.0.2 / flash player problem, because other apps like browser and dolphin mini crash when flash is put into full screen mode.

这篇关于当试图进入全屏模式的Android 4.0时,Flash播放器崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆