Search code examples
javaandroidflash

Android flash magazine application


Is it possible to create a magazine based on Android embedding flash in it?


Solution

  • As your question is very wilde and generic, I can only say "yes that's possible"!

    Here is a link to embed your swf file into an Android application.

    Load an SWF into a WebView

    public class Test3Activity extends Activity {
        /** Called when the activity is first created. */
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);
    
            String url ="file:///android_asset/qualibus.swf";
    
            WebView wv=(WebView) findViewById(R.id.webView1);
            wv.getSettings().setPluginsEnabled(true);
            wv.loadUrl(url);
        }
    }
    

    main.xml:

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout 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/webView1" 
        android:layout_width="match_parent" 
        android:layout_height="match_parent">
    </WebView>
    </LinearLayout>
    

    Result:

    Application running and displaying swf in web view