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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to