0

here is the code i dont know why this this method setPluginsEnabled is undefined try to deprecation this but it doesnt work ??????

public class Webv extends Activity{

WebView webview;



public void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);

     setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
     webview = new WebView(this);
     setContentView(R.layout.activity_webv);
     webview = (WebView)findViewById(R.id.wvVideos);
     webview.setWebViewClient(new WebViewClient(){
            public boolean shouldOverrideUrlLoading(WebView view, String url) {
                view.loadUrl(url);
                return false;
            }
        });

     webview.getSettings().setBuiltInZoomControls(true);
     webview.getSettings().setSupportZoom(true);
     webview.getSettings().setUseWideViewPort(true);
     webview.getSettings().setLoadWithOverviewMode(true);
     webview.getSettings().setJavaScriptEnabled(true);
     webview.getSettings().setPluginState(WebSettings.PluginState.ON);

     webview.getSettings().setPluginsEnabled(true);
     webview.invokeZoomPicker();
     webview.loadUrl(getIntent().getStringExtra("nameseries"));
}

@Override
protected void onDestroy() {
    super.onDestroy();
    webview.loadData("", "text/html", "utf-8");
}

}
M. Abbas
  • 6,409
  • 4
  • 33
  • 46
DoctorDoom
  • 501
  • 2
  • 8
  • 21
  • What version of android are you compiling at? Right click your project, hit properties, then click android and see which api level you are using. – Vic Vuci Aug 21 '13 at 13:54

1 Answers1

1

According to http://developer.android.com/reference/android/webkit/WebSettings.html, there is no method setPluginsEnabled for WebSettings. Maybe it's an older method that has been removed in newer versions?

Additionally, the text next to setPluginState reads:

This method was deprecated in API level 18. Plugins will not be supported in future, and should not be used.

You should probably follow that advice.

Buurman
  • 1,914
  • 17
  • 26