title: PhoneGap: Add CordovaWebView to DroidGap
body: <p>I would like to embed a CordovaWebView to the class which extends DroidGap.</p>
  
  <p>TestActivity.java:</p>
  
  <pre><code>public class TestActivity extends DroidGap {
      private static CordovaWebView webView;
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          super.loadUrl("&lt;local page link - index.html&gt;");
  
          //Create CordovaWebView
          webView = new CordovaWebView(this);
          webView.loadUrl("&lt;remote page link&gt;");
  
          //Get the current layout and add the CordovaWebView to it
          RelativeLayout rootRelativeLayout = new RelativeLayout(this);
          ((FrameLayout) root.getParent()).removeAllViews();
          rootRelativeLayout.addView(root);
          rootRelativeLayout.addView(webView);
          setContentView(rootRelativeLayout);
      }
  }
  </code></pre>
  
  <p>The remote page can be displayed in CordovaWebView but PhoneGap API cannot be invoked.
  However, if I load the remote page in <code>super.loadUrl("&lt;remote page link&gt;")</code> directly. The API can be invoked successfully. May I know what is the problem here? Thanks in advance.</p>
  
  <p>Here is the log in LogCat. It seems that <code>onMessage</code> is not being called.</p>
  
  <pre><code>06-12 17:05:06.554: D/CordovaWebView(5102): &gt;&gt;&gt; loadUrl(&lt;remote page link&gt;)
  06-12 17:05:06.554: D/PluginManager(5102): init()
  06-12 17:05:06.554: D/CordovaWebView(5102): &gt;&gt;&gt; loadUrlNow()
  06-12 17:05:11.519: I/GATE(5102): &lt;GATE-M&gt;DEV_ACTION_COMPLETED&lt;/GATE-M&gt;
  06-12 17:05:26.559: E/CordovaWebView(5102): CordovaWebView: TIMEOUT ERROR!
  </code></pre>