title: URL with parameter in WebView not working in Android?
body: <p>I am trying to call the loadUrl method in a webview with the below url</p>
  
  <p><a href="http://stage.realtylog.net/iPhone/functions.php?username=xxx&amp;ID=xxx&amp;act=readFileAndPrint" rel="noreferrer">http://stage.realtylog.net/iPhone/functions.php?username=xxx&amp;ID=xxx&amp;act=readFileAndPrint</a></p>
  
  <p>When calling this URL, it gives an image from server. I need to display that image on a webview.</p>
  
  <p>It's working fine with normal URLs. But its not working with the above url with parameters.</p>
  
  <p>It gives me an error like:</p>
  
  <blockquote>
    <p>Function name must be a string in
    /var/www/stage/realtylog.net/iPhone/functions.php</p>
  </blockquote>
  
  <p>I tried to URLEncode the above url , but its still not working.
  Any kind of help will be highly appreciated.</p>
  
  <pre><code>package com.hussain.webview2;
  
  import android.app.Activity;
  import android.os.Bundle;
  import android.view.Window;
  import android.webkit.SslErrorHandler;
  import android.net.http.*;
  import android.webkit.WebChromeClient;
  import android.webkit.WebView;
  import android.webkit.WebViewClient;
  
  
  public class WebViewDemo2Activity extends Activity
  {
     final Activity activity = this;
  
      @Override
      public void onCreate(Bundle savedInstanceState)
      {
         super.onCreate(savedInstanceState);
         this.getWindow().requestFeature(Window.FEATURE_PROGRESS);
         setContentView(R.layout.main);
  
         WebView webView = (WebView) findViewById(R.id.webview);
        // webView.setWebViewClient(new WebViewClient());
        // webView.addView(webView.getZoomControls());
        webView.getSettings().setJavaScriptEnabled(true);
  
        webView.setWebChromeClient(new WebChromeClient() {
          public void onProgressChanged(WebView view, int progress)
          {
              activity.setTitle("Loading...");
              activity.setProgress(progress * 100);
  
              if(progress == 100)
                  activity.setTitle("Done");
          }
      });
  
      webView.setWebViewClient(new WebViewClient() {
          @Override
         public void onReceivedError(WebView view, int errorCode, String description, String failingUrl)
         {
             // Handle the error
         }
  
  
  
          @Override
          public boolean shouldOverrideUrlLoading(WebView view, String url)
          {
              view.loadUrl(url);
              return true;
          }
      });
  
      //webView.loadUrl("http://developer.android.com");
      webView.loadUrl("http://stage.realtylog.net/iPhone/functions.php?username=xxxx&amp;ID=xxxx&amp;act=readFileAndPrint");
  
  
      }
  }
  </code></pre>