Hello everyone, I am trying to make this code to work, it just seems that WebView's PageFinished event is not being fired after the url page load. I am using WebViewExtras2, the code runs but the event is not working. I can't find good examples and most of them seemed to be for ver 1.4.
B4X:
Sub Class_Globals
Private Root As B4XView
Private xui As XUI
Private wvExtras As WebViewExtras
Private WebViewClient As DefaultWebViewClient
Private JavascriptInterface1 As DefaultJavascriptInterface
Private WebViewChrome As DefaultWebChromeClient
.... more code here, but ignored for this example...
End Sub
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
B4XPages.SetTitle(Me, "MD GSSMobile")
frmQRScanner.Initialize
B4XPages.AddPage("QRScanner", frmQRScanner)
urlView.JavaScriptEnabled = True
JavascriptInterface1.Initialize
wvExtras.Initialize(urlView)
WebViewClient.Initialize("WebViewClient")
wvExtras.SetWebViewClient(WebViewClient)
WebViewChrome.Initialize("WebViewChrome")
wvExtras.SetWebChromeClient(WebViewChrome)
wvExtras.addJavascriptInterface(JavascriptInterface1, "B4X")
' Load the initial page
urlView.LoadUrl("https://testing.com/index.aspx")
End Sub
Private Sub urlView_PageFinished (Url As String)
Dim sLine = Url
... more code here...
End Sub