title: Unable to call a new Activity from Javascript
body: <p>I trying to call a new Activity from my Webview. However, whenever i click on the specified <code>&lt;div&gt;</code> nothing happens. Please see my implementation below:</p>
  
  <p><strong>MainActivity.java</strong></p>
  
  <pre><code>WebView myWebView;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
  
      myWebView = (WebView) findViewById(R.id.webView1);
      WebSettings webSettings = myWebView.getSettings();
      webSettings.setJavaScriptEnabled(true);
      myWebView.addJavascriptInterface(this, "Android");
      myWebView.loadUrl("http://.../hello.html");
  }
  
  @JavascriptInterface
  public void newActivityCalled(){
          Intent intent = new Intent(this,NewAct.class);
          startActivity(intent);
  }
  </code></pre>
  
  <p><strong>hello.html</strong></p>
  
  <pre><code>&lt;!DOCTYPE HTML&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
  &lt;link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css"&gt;
  &lt;script src="http://code.jquery.com/jquery-1.10.2.min.js"&gt;&lt;/script&gt;
  &lt;script src="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  
      $("#yoyo").click(function (){
          Android.newActivityCalled();
      });
  
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div id="yoyo"&gt; New Activity Text &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>