Some Websites hide the true URL using Masking or Stealth Redirection
Can some kind soul provide a solution to get the REAL URL of the Page - not the Masked URL being displayed in Address Bar, which remains constant no matter what Page you navigate to on the Website
Reward "donation" is USD 300 - cause I'm desperate for a solution
The Mission: UN-MASK REAL URL of any Website which utilises URL Masking
......
Dim frameID As String = "Whatever" 'You need to get the real ID of the iframe, obviously
ww.executeJavascript(wv, "B4A.CallSub('Log_URL', true, 'document.getElementById('" & frameID & "').contentWindow.location.href')")
End Sub
Sub Log_Url(url As String)
Log(url)
End Sub
Did you set the InterfaceName as B4A? If not, change it accordingly. Here's an updated snippet that sets the InterfaceName correctly:
B4X:
.....
Dim frameID As String = "Whatever" 'You need to set this value correctly
ww.addJavascriptInterface(wv, "B4A")
ww.executeJavascript(wv, "B4A.CallSub('Log_URL', true, 'document.getElementById('" & frameID & "').contentWindow.location.href')")
End Sub
Sub Log_Url(url As String)
Log(url)
ToastMessageShow(url, True)
End Sub
Also, don't forget that the iframe's ID isn't "Whatever". You need to figure out what it is set Dim frameID As String correctly.