我在 sdcard 上有一个 swf 文件,我写了一个嵌入了 swf 文件的 html 文件 flash.html。现在打开它的唯一方法是 1) 打开浏览器 2) 输入 file:///sdcard/flash.html swf 运行良好。
但如果使用下面的代码列表:
Uri uri = Uri.parse("file:///sdcard/flash.html");
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);
它显示错误:应用程序已意外停止。
我还使用 WebView 尝试了以下代码:
WebView browser = (WebView) findViewById(R.id.list_web);
browser.loadUrl("file:///sdcard/flash.html");
Webview 出现了,但该区域应该开始 swf 是空的。
那么有没有办法通过代码打开html,我该怎么做呢?
我还认为是否有办法通过简单的 html 使用 ACTION_VIEW 打开 android 浏览器,然后通过代码重置 URL?