• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Flash in android

super_nova

Lurker
I want to play a flash file .swf file in android .....for that i have written the code which is below............Can anybody help me where is the fault..and how to play a flash file..........

package com.android.hello;

import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;

public class TestrunActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
WebView mWebView;
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
mWebView =(WebView) findViewById(R.id.webview);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setPluginsEnabled(true);
mWebView.getSettings().setAllowFileAccess(true);

String html =
"<object width=\"550\" height=\"400\"> <param name=\"movie\" value=\"file:///android_asset/sun_clock.swf\"> <embed src=\"file:///android_asset/sun_clock.swf\" width=\"550\" height=\"400\"> </embed> </object>";
String mimeType = "text/html";
String encoding = "utf-8";
mWebView.loadDataWithBaseURL("null", html, mimeType, encoding, "");
}
}


I will be veru thanfull to u ..........:) :o
 
Back
Top Bottom