【发布时间】:2013-04-16 13:53:15
【问题描述】:
我是 android 和 Java 的完全新手,我的应用程序可以在我的 android 平板电脑上运行,除了我的嵌入式 Flash 文件。我知道 flash 可以在 android 中运行,因为我安装了 flash 播放器,我已经在 Mozilla Firefox 中测试了我的 index.html,它显示了嵌入的 flash 文件,我已经在 Google Chrome 中测试了我的 index.html,嵌入的 flash 文件没有工作。有没有一种方法可以从我的 index.html 中读取我的 flash 文件,以便当它作为应用程序导出时可以显示 flash 电影?
<!--Embedded flash movie-->
<p>
<object width="710" height="493">
<param name="movie" value="welcome.swf">
<embed src="yaa/welcome.swf"
width="710" height="493"> </embed>
</object>
</p>
我已经尝试了从 swf 对象到 webview 的所有内容,清单权限很好,但都无法显示我的 flash 电影。 www 文件夹包含 assets 文件夹, assets 文件夹的结构是; yaa(包含 flash swf 文件的文件夹)、cordova 2.5.0、index.html、css、javascripts。 java代码是:
package com.helloapp.namespace.myhelloworld;
导入 org.apache.cordova.DroidGap;
导入android.os.Bundle;
public class MyPhoneGapActivity extends DroidGap {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.setIntegerProperty("splashscreen", R.drawable.splash);
super.loadUrl("file:///android_asset/www/index.html");
}
}
【问题讨论】:
-
将此行添加到您的 AndroidManifest 文件中:android:hardwareAccelerated="true" 还有stackoverflow.com/a/6054634/1848600
-
谢谢,但我已经添加了 android:hardwareAccelerated="true" 并且我已经放置了 websettings 插件,它仍然不会在应用程序中显示 Flash 电影。
-
android 4.4+ 不支持 flash player(fly/swf) 视频
标签: java android flash cordova jquery-mobile