Tuesday, June 28, 2011

[android-developers] Android Honeycomb 3.1 webclient with flash content - not working :-(

I am trying to embed a webclient in my app, and the page has flash
content, i'm pretty sure it's loading the flash, but it's not
displaying it. Anyone know the problem?

public class FlashTestActivity extends Activity {

final Activity activity = this;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);


WebView webView = (WebView) findViewById(R.id.webView1);
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setPluginsEnabled(true);

webView.setWebChromeClient(new WebChromeClient() {
public void onProgressChanged(WebView view, int progress)
{
activity.setTitle("Loading...");
activity.setProgress(progress * 100);

if(progress == 100)
activity.setTitle(R.string.app_name);
}
});

webView.setWebViewClient(new WebViewClient() {
@Override
public void onReceivedError(WebView view, int errorCode,
String description, String failingUrl)
{
// Handle the error
}

@Override
public boolean shouldOverrideUrlLoading(WebView view, String
url)
{
view.loadUrl(url);
return true;
}
});

webView.loadUrl("http://www.adobe.com/software/flash/about/");
}
}

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment