我想在android上運行簡單的Flash視頻播放器。我只能打一個問號。有人能說出這段代碼有什麼問題嗎?無法在Android設備上運行Flash視頻播放器
webview = (WebView) findViewById(R.id.webview);
webview.getSettings().setJavaScriptEnabled(true);
webview.setWebViewClient(new WebViewClient() {
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
@Override
public void onReceivedHttpAuthRequest(WebView view, HttpAuthHandler handler, String host,String realm){
String[] up = view.getHttpAuthUsernamePassword(host, realm);
if(up != null && up.length == 2) {
handler.proceed(up[0], up[1]); }
else Log.d("WebAuth","Could not find user/pass for domain :"+ host+" with realm = "+realm);
}
});
webview.getSettings().setSupportZoom(true);
webview.getSettings().setJavaScriptEnabled(true);
webview.getSettings().setAllowFileAccess(true);
webview.getSettings().setPluginsEnabled(true);
webview.loadUrl("http://tvforandroid.com/p/?p=1020");
當您在網頁瀏覽器中打開網頁時,是否可以查看Flash視頻? – Mannaz 2011-03-20 14:53:30