title: How to start new activity fron android webview javascript interface
body: <p>I'm working on android web application.</p>
  
  <p>I want to start new activity from javascript.I googled and found a code to show toast.this is it.</p>
  
  <pre><code>    public class WebAppInterface {
              Context mContext;
  
              /** Instantiate the interface and set the context */
              WebAppInterface(Context c) {
                  mContext = c;
              }
  
      /** Show a toast from the web page */
      @JavascriptInterface
      public void showToast(String toast) {
          Toast.makeText(mContext, toast, Toast.LENGTH_SHORT).show();
      }
  }
  </code></pre>
  
  <p>That code is working fine. but when I try to start new activity nothing happen.here is my code(sorry for bad english)</p>
  
  <pre><code>    public class WebAppInterface {
      Context mContext;
  
      /** Instantiate the interface and set the context */
      WebAppInterface(Context c) {
          mContext = c;
      }
  
      /** Show a toast from the web page */
      @JavascriptInterface
      public void showToast(String toast) {
          Intent showAd = new Intent(getBaseContext(), ShowAd.class);
          startActivity(showAd);
      }
  }
  </code></pre>