webview : how to handle javascript code from multiple web pages
<p>In a WebView, how do you access the JavaScriptInterface from multiple web 
pages, and not just from the page that you load via mWebView.loadUrl("http://10.241.139.45:9081/amexco/login.html")</p>

<p>e.g.</p>

<p>In my project's assets folder, I have:</p>

<pre><code>login.html
page1.html
page2.html
</code></pre>

<p>... and here is the relevant WebView code:</p>

<pre><code>webView.addJavascriptInterface(new JavaScriptInterface(), "android");
webView.loadUrl("file:///android_asset/index.html");
</code></pre>

<p>So at different points in time, a user may look at index.html, page1.html, etc. From what I can tell, only the JavaScript in index.html has access to the JavaScriptInterface via "window.android.someMethodName()". When I try to make a call to "window.android.someMethodName()" from page1.html, it says that "window.android" is not defined.</p>

<p>so the user starts the webview from 
login.html page and navigates through different pages..
my requirement is in the last page of my webpage i have a button saying return to android  activity. so when user clicks on the last page of my navigation the user has to come back to the android activity.</p>

<p>window.android.someMethodName()" can be called in html page which works fine. but this method will work if i call this method only from the first page which i loaded ie from the login.html page only this method will work.. if i call this method from the last page of the webview naviagation this is not working.</p>

<p>Can any one help me out in this.</p>
