title: Javascript apply function is not working on Android WebView?
body: <p>I am using the following code,</p>
  
  <pre><code>var iphoneUrl = 'myScheme://{0}?{1}'
  function callNativeFunction(functionName) {
      var args = Array.prototype.slice.call(arguments, 1);
      if (window.andriod) {
          andriod[functionName].apply(this, args);
      }
      else {
          var params = '';
          for (var i = 0, len = args.length; i &lt; len; i++) {
              params += 'param' + (i + 1) + '=' + encodeURIComponent(args[i]) + '&amp;';
          }
          params = params.slice(0, -1);// remove last &amp;
          window.location = iphoneUrl.format(functionName, params);
      }
  }
  callNativeFunction('functionName', 'param1');
  </code></pre>
  
  <p>Here is String.Format,</p>
  
  <pre><code>String.prototype.format = function () {
      var args = arguments;
      return this.replace(/{(\d+)}/g, function (match, number) {
          return typeof args[number] != 'undefined'
            ? args[number]
            : match
          ;
      });
  };
  </code></pre>
  
  <p>which great but on andriod webview apply is not working. <code>alert(andriod[functionName])</code> give me   <code>'function myFunc(..){[native Code]}'</code>. But <code>andriod[functionName]</code> does not call the function. Not If use <code>andriod.myFunc</code> then it works but I don't want the function to be hard coded.</p>