2

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

djot
  • 2,952
  • 4
  • 19
  • 28
Pattabi Raman
  • 5,814
  • 10
  • 39
  • 60

1 Answers1

3

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

Community
  • 1
  • 1
Waza_Be
  • 39,407
  • 49
  • 186
  • 260
  • 1
    Thank you.. Thanks a lot for this greatful suggestion – Pattabi Raman Sep 13 '11 at 11:23
  • I think that in the future, you will have a look at this question: http://stackoverflow.com/questions/5095977/screen-blinking-when-using-a-webview-with-flash Flash is not totally perfect... – Waza_Be Sep 13 '11 at 14:08