error to startActivity (intención), ¿qué va mal?

Debajo de aquí en código startActivity (intención) me da un error

Aquí está mi código:

public class MyWebViewClient3 extends WebViewClient { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { if (Uri.parse(url).getHost().equals("www.facebook.com")) { // This is my web site, so do not override; let my WebView load the page return false; } // Otherwise, the link is not for a page on my site, so launch another Activity that handles URLs Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); startActivity(intent);//this is where it goes wrong return true; } } 

El cliente WebViewClient no es un contexto , por lo que no puede iniciar Actividad desde aquí. Es posible que desee obtener Contexto como referencia y luego decir

 context.startActivity(intent); 

Después de la sugerencia de vmironov ..

 @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { if (Uri.parse(url).getHost().equals("www.facebook.com")) { // This is my web site, so do not override; let my WebView load the page return false; } // Otherwise, the link is not for a page on my site, so launch another Activity that handles URLs Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); view.getContext().startActivity(intent); return true; } 
  • Windows Phone 7 equivalente de Android WebView
  • La autenticación de Dropbox deja abierto el navegador
  • Android webview: detecte una larga pulsación en <a> y <img>
  • Actividad de Android como diálogo, pero sin una barra de título
  • WebView con un androide IFRAME
  • Establecer credenciales en una vista Web de Android mediante una conexión HTTPS segura
  • Aceleración de hardware WebView de Android
  • ¿Por qué WebView es mucho más rápido que un TextView?
  • Autorizar al usuario en el sitio web de Google en WebView mediante un diálogo
  • Cómo ocultar la página de error de WebView. ¿Es posible?
  • La vista web de Android no muestra google maps
  • FlipAndroid es un fan de Google para Android, Todo sobre Android Phones, Android Wear, Android Dev y Aplicaciones para Android Aplicaciones.