2

I am using webview control for displaying a flash .swf file in my application. when i run the app screen displaying whole white scrren.

Here it is my code,

   public class flash extends Activity {
/** Called when the activity is first created. */
@Override   
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);   
    requestWindowFeature(Window.FEATURE_NO_TITLE);
    setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);

    setContentView(R.layout.main);


    String url ="file:///android_asset/beautiful.swf";
    WebView webview = (WebView) findViewById(R.id.flash_webview);

    webview.getSettings().setPluginsEnabled(true);  
    webview.getSettings().setAllowFileAccess(true);      
    webview.loadUrl(url);     


}      
}

and the xml file contains webview control

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
  <WebView 
android:id="@+id/flash_webview"
 android:layout_width="fill_parent"
android:layout_height="fill_parent"/>

</RelativeLayout>

and also i added the Android:hardwareAccelerated:"true" in the manifest file.

i am still stuck with the white screen.

Please help.

Thanks in advance.

naleshmadur
  • 95
  • 1
  • 10

1 Answers1

0

Have you tried embeding the .swf file in an html file and load this html ?

Alexander Fuchs
  • 1,358
  • 3
  • 19
  • 36