[android-developers] Re: WebView Java script function

2012-03-08 Thread John Purcell
Amit, WebViewClient.onPageStarted() is the most reliable and does not depend on JS. -John On Wednesday, March 7, 2012 7:22:47 AM UTC-5, Amit wrote: Thanks John for response. With my response It is not necessary to be same url as it being loaded from. I didn't mean variable url in

[android-developers] Re: WebView Java script function

2012-03-07 Thread Amit
Thanks John for response. With my response It is not necessary to be same url as it being loaded from. I didn't mean variable url in Moktarul's solution can contain wrong value. I was meant: for callback, this info is passed as string variable. This argument carries actual url value, if

[android-developers] Re: WebView Java script function

2012-03-06 Thread John Purcell
Amit, But i think, if android API provides this infromation, it will be reliable information as android known which url it is currently loading. This is incorrect, *webkit* knows what url is authoritatively being loaded (not necessarily Android). The webkit/JS container bridge is

[android-developers] Re: WebView Java script function

2012-03-05 Thread moktarul anam
Hi Amit. in html header script function onload(){ var url = window.loacation; alert(url); Android.currentUrl(url); } /script body onload=onload() Moktarul On Monday, 5 March 2012 18:03:30 UTC+5:30, Amit wrote: Hi, I am exposing java script function from my webview. This Java

[android-developers] Re: WebView Java script function

2012-03-05 Thread Amit
I think you code snippet has currentUrl() as JS exposed function. Is there anyway to get urk infromation from android API. Android.currentUrl(url), caller can pass anystring. It is not necessary to be same url as it being loaded from. But i think, if android API provides this infromation, it