Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/465.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/202.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 带有嵌入式Flash的Android WebView无法进行外部接口调用_Javascript_Android_Flash_Webview - Fatal编程技术网

Javascript 带有嵌入式Flash的Android WebView无法进行外部接口调用

Javascript 带有嵌入式Flash的Android WebView无法进行外部接口调用,javascript,android,flash,webview,Javascript,Android,Flash,Webview,我正在尝试使用WebView显示全屏swf。我的目标是让swf调用返回javascript->java以调用函数。我已经尝试使用swfobject嵌入我的swf,并执行allowScriptAccess。这种方法在调整大小方面看起来很糟糕,但遗憾的是,无法调用外部javascript。当我使用loadUrl时,flash看起来最好(file:///android_asset/file.swf?width=200&height=343)但是这种方法也不允许外部调用由flash执行 有人有这个问题吗

我正在尝试使用WebView显示全屏swf。我的目标是让swf调用返回javascript->java以调用函数。我已经尝试使用swfobject嵌入我的swf,并执行allowScriptAccess。这种方法在调整大小方面看起来很糟糕,但遗憾的是,无法调用外部javascript。当我使用loadUrl时,flash看起来最好(file:///android_asset/file.swf?width=200&height=343)但是这种方法也不允许外部调用由flash执行

有人有这个问题吗?我可以从javascript客户端代码中很好地调用它们。让警报正常工作,并有几个其他链接。我想只是在紧急电话或许可证中遗漏了一些小东西

我们已经试过了

ExternalInterface.call("window.alert", "test");
ExternalInterface.call("alert", "test");
ExternalInterface.call("window.histree.alert", "test");
这是我的webview设置

   /* Get the WebView */
   wv1 = (WebView) findViewById(R.id.wv1);
   wv1.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);

    /* Activate JavaScript */
    wv1.getSettings().setJavaScriptEnabled(true);
    wv1.getSettings().setPluginsEnabled(true);
    wv1.setBackgroundColor(R.color.black);
    wv1.setWebViewClient(new InsideWebViewClient());
    wv1.addJavascriptInterface(new HistreeJavaScriptInterface(), "histree");

    wv1.setWebChromeClient(new WebChromeClient() {          
        @Override
        public boolean onJsAlert(WebView view, String url, String message, JsResult result) {
            AlertDialog.Builder adb=new AlertDialog.Builder(HistreeView.this);
            adb.setMessage(message);
            adb.setPositiveButton(R.string.OK, null);
            adb.show();         

            result.confirm();
            return true;
        }
    });

嗨,我遇到了同样的问题。你在这方面有什么进展吗?谢谢,我在不久前就提出了这一点,以支持作为本机Java在Flash中完成我想做的事情