I’m trying to load a simple swf into an embebed WebView.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
WebView wv = (WebView)findViewById(R.id.web);
WebSettings settings = wv.getSettings();
settings.setPluginState(PluginState.ON);
wv.loadUrl("file:///android_asset/example.swf");
}
main.xml:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<WebView android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/web"/>
</LinearLayout>
I don’t see anything wrong in this code… but still my web view shows black
By Checking the LogChat I have found this error:
11-30 12:46:32.170: E/libEGL(13839): call to OpenGL ES API with no current context (logged once per thread)
By is that? How can I solve it?
I am using this swf: http://www.tizag.com/pics/example.swf
I am working with a Motorola Xoom – Android 3.1.
Could anyone helpme with this?
I just find my own answer!!!! You should activate the attribute android:hardwareAccelerated in your aplication in your manifest like so: