Bear in mind that Flash is no longer available for Android.

On Wed, Feb 20, 2013 at 4:39 AM, Gaurav Wable <gswa...@gmail.com> wrote:
> having a.swf file in assets folder.
> this code is working for os 2.3.3 but not for 4.0.4
> i have set the parameter android:hardwareaccelerated = true
>
>
> onCreate() {
>
> String html =
> "<object width=\"250\" height=\"200\"> " +
> "<param name=\"movie\" value=\"file:///android_asset/a.swf\"> <embed
> src=\"file:///android_asset/a.swf\" width=\"250\" height=\"200\"> </embed>
> </object>";
> String mimeType = "text/html";
> String encoding = "utf-8";
>
> WebView wv=(WebView) findViewById(R.id.presentation_webview);
> wv.getSettings().setJavaScriptEnabled(true);
> wv.getSettings().setPluginState(PluginState.ON);
> wv.loadDataWithBaseURL("null", html, mimeType, encoding,  "");
> wv.setWebViewClient(new HelloWebViewClient());
> }
>
> @Override
> public boolean onCreateOptionsMenu(Menu menu) {
> // Inflate the menu; this adds items to the action bar if it is present.
> getMenuInflater().inflate(R.menu.activity_main, menu);
> return true;
> }
> public class HelloWebViewClient extends WebViewClient {
>
> @Override
> public boolean shouldOverrideUrlLoading(WebView view, String url) {
> view.loadUrl(url);
> return true;
> }
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in NYC: http://marakana.com/training/android/

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to