Abstract Iphone/Android Function Call from Javascript?
<p>In Iphone, I need to use,</p>

<pre><code> window.location = 'myscheme://FunctionName?Param1=Value1&amp;.........';
</code></pre>

<p>But In Android,</p>

<pre><code>Android.FunctionName(params);
</code></pre>

<p>This works for me,</p>

<pre><code>if(window.Android)
    Android.FunctionName(params);
else
    window.location = 'myscheme://FunctionName?Param1=Value1&amp;.........';
</code></pre>

<p>But doing this for each and every function is pain for me. Is it possible to abstract these details and use a single function to call both.</p>
