title: Reading hidden field value from webview Android
body: <p>I am creating an application which has user registration page. This page is loaded from the url in my webview which has submit button. After submitting form it gives the me one hidden field in the next url with userid. My problem is I want read that hidden field value from that url in to my android application.</p>
  
  <p>I have tried using the following function for getting the loading page Event.</p>
  
  <pre><code>@Override
      public void onPageFinished(WebView view, String url) {
          super.onPageFinished(view, url);
  
          view.loadUrl("javascript:window.HTMLOUT.showHTML('&lt;head&gt;'+document.getElementsById('userId').innerHTML+'&lt;/head&gt;');");
      }
  </code></pre>
  
  <p>Then my showHtml Method is like this </p>
  
  <pre><code>class MyJavaScriptInterface  
   {  
       @SuppressWarnings("unused")  
       public void showHTML(String html)  
       {  
          System.out.println("HTML "+html);
  
  
       }  
   }
  </code></pre>
  
  <p>Still I'm not able to get the data of the HTML page loaded after registering the user.
  Can any body please guide me what am I doing wrong here? or is this not the way should I get the data of hidden field.</p>