Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim webview1 As WebView
Dim webviewextras1 As WebViewExtras
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("main")
webview1.SetLayout(50,50,80%x,80%y)
webview1.LoadUrl("http://www.google.com")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub WebView1_PageFinished (Url As String)
webviewextras1.executeJavascript(webview1, "alert('Hello World')")
Dim Javascript As String = "B4A.CallSub('processHTML', true, document.documentElement.outerHTML)"
Log("PageFinished: "&Javascript)
webviewextras1.executeJavascript(webview1, Javascript)
End Sub
Sub processHTML(html As String)
Log(html)
Log("done")
End Sub